ci: grant pull-requests read permission to PR title workflow - #16
Merged
Conversation
The Conventional Commits workflow calls the reusable workflow appium/appium-workflows/.github/workflows/pr-title.yml, whose conventional-pr-check job declares `permissions: pull-requests: read`. A called workflow can never hold more permissions than its caller. This caller declared no `permissions:` block, so it inherited the repository's restricted default GITHUB_TOKEN scopes (pull-requests: none) and GitHub rejected the run at parse time with a startup_failure: The nested job 'conventional-pr-check' is requesting 'pull-requests: read', but is only allowed 'pull-requests: none'. Declare the minimum scopes explicitly so the check runs regardless of the repository's default workflow permissions setting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeCzb8yu8DPk9wa292irps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Conventional Commits workflow fails with
startup_failurebefore any job is scheduled — for example run 33952074548 on #1:.github/workflows/pr-title.ymlcalls the reusable workflowappium/appium-workflows/.github/workflows/pr-title.yml@main, whoseconventional-pr-checkjob declarespermissions: pull-requests: read(needed byamannn/action-semantic-pull-request@v6).A called workflow can never hold more permissions than its caller. This caller declared no
permissions:block, so it inherited this repository's restricted defaultGITHUB_TOKENscopes (pull-requests: none), and GitHub rejects the run at parse time.Change
Declare the minimum required scopes explicitly on the caller:
This keeps least privilege and makes the workflow work regardless of the repository's Default workflow permissions setting.
lock-update.ymlandpublish.ymlalready set their permissions explicitly;pr-title.ymlwas the only workflow relying on the inherited default.Verification
masterand that branch picks up the change — workflow definitions are read from the run's head commit.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeCzb8yu8DPk9wa292irps
Generated by Claude Code