Skip to content

Declare workflow-level permissions for CI and TODO-to-Issue#3734

Merged
andreia-ferreira merged 4 commits into
google:masterfrom
arpitjain099:ci/add-permissions
May 22, 2026
Merged

Declare workflow-level permissions for CI and TODO-to-Issue#3734
andreia-ferreira merged 4 commits into
google:masterfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Note: .github/ is in this repos .gitignore, so this commit uses git 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.ymlgradle assembleDebug + lint + unit tests. contents: read covers checkout.
  • todo-to-issue.yml — uses alstr/todo-to-issue-action to find TODO comments in a PR, create issues for them, rewrite the TODOs inline with the new issue URLs, and git push those rewrites back. Needs:
    • contents: write — the inline rewrite + git push origin "$HEAD_REF" step
    • issues: write — the action creates issues via the Issues API

The job is gated on github.event.pull_request.head.repo.full_name == github.repository, so it never runs on fork PRs.

test-e2e.yml and e2e-dispatch.yml in this repo already use the explicit-permissions convention.

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>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.05%. Comparing base (3fbc313) to head (4651e6e).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3734      +/-   ##
============================================
- Coverage     68.06%   68.05%   -0.02%     
+ Complexity     1613     1612       -1     
============================================
  Files           368      368              
  Lines          9528     9528              
  Branches       1242     1242              
============================================
- Hits           6485     6484       -1     
- Misses         2376     2377       +1     
  Partials        667      667              

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@andreia-ferreira andreia-ferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, thanks for fixing this 🙌

CodeQL has an issue where it doesn't run on fork PRs and I don't have override permissions to merge this. @shobhitagarwal1612 @gino-m could you help with the merge? CI runs well on fork PRs now, merging this!

@andreia-ferreira andreia-ferreira merged commit 86da325 into google:master May 22, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants