Declare workflow-level permissions for CI and TODO-to-Issue#3734
Open
arpitjain099 wants to merge 1 commit into
Open
Declare workflow-level permissions for CI and TODO-to-Issue#3734arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
ci.yml: contents: read (gradle build + unit tests + lint). todo-to-issue.yml: contents: write + issues: write because alstr/todo-to-issue-action creates issues for TODO comments and pushes the rewritten files back to the PR head branch. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
f4d51d6 to
db76d5e
Compare
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.
Note:
.github/is in this repos.gitignore, so this commit usesgit add -f` to override the ignore for these workflow files. I assume the gitignore entry is incidental rather than deliberate — happy to update the gitignore in this PR if maintainers prefer.Two workflows declared no
permissions:block:ci.yml—gradle assembleDebug+ lint + unit tests.contents: readcovers checkout.todo-to-issue.yml— usesalstr/todo-to-issue-actionto find TODO comments in a PR, create issues for them, rewrite the TODOs inline with the new issue URLs, andgit pushthose rewrites back. Needs:contents: write— the inline rewrite +git push origin "$HEAD_REF"stepissues: write— the action creates issues via the Issues APIThe job is gated on
github.event.pull_request.head.repo.full_name == github.repository, so it never runs on fork PRs.test-e2e.ymlande2e-dispatch.ymlin this repo already use the explicit-permissions convention.