Open
Conversation
c65551d to
80424aa
Compare
80424aa to
2e5bd7d
Compare
618e8c9 to
98e4b74
Compare
98e4b74 to
dd0d1c5
Compare
Comment on lines
10
to
16
| stale: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9 | ||
| - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10 | ||
| with: | ||
| operations-per-run: 200 | ||
| delete-branch: true |
There was a problem hiding this comment.
Bug: The stale workflow enables delete-branch: true but lacks the necessary permissions: contents: write, which will cause branch deletion to fail under modern repository security settings.
Severity: MEDIUM
Suggested Fix
Add a permissions: block to the job in .github/workflows/stale.yml to explicitly grant contents: write permission, ensuring the action can delete branches as intended.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/stale.yml#L10-L16
Potential issue: The `stale.yml` workflow uses `actions/stale@v10` with the
`delete-branch: true` option. This option requires `contents: write` permission, but the
workflow file does not define a `permissions:` block to grant it. If the repository's
default workflow permissions are set to be restrictive (read-only), the action will
silently fail to delete branches when closing stale pull requests. This will cause
unused branches to accumulate in the repository, even though the rest of the action
(like closing the PR) will succeed.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
This PR contains the following updates:
v9→v10Release Notes
actions/stale (actions/stale)
v10Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.