Fix on-merge workflow permissions for dependency tests#635
Merged
Conversation
PR #629 added `permissions: {}` to on-merge.yaml, which blocks called workflows from requesting any permissions. The testing-dependency.yaml workflow (and its sub-workflows) require `contents: read` to checkout the repo, causing a startup_failure on every push to main. Grant `contents: read` at the caller level so called workflows can operate within that allowance.
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.
Summary
permissions: {}toon-merge.yaml, which grants zero permissions to called workflowstesting-dependency.yamland its sub-workflows (testing-dependency-rest,testing-dependency-asyncio,testing-dependency-grpc) all requirecontents: readstartup_failurebefore any jobs executecontents: readat the caller level — the minimum permission neededTest plan
Note
Low Risk
Low risk: this only adjusts GitHub Actions workflow permissions and should mainly affect whether CI can start successfully.
Overview
Fixes the
on-merge.yamlcaller workflow permissions so reusable workflows can run.Replaces
permissions: {}(no permissions) with the minimal requiredpermissions: contents: read, preventingstartup_failurewhen invoking downstream dependency test workflows.Reviewed by Cursor Bugbot for commit 6dcd48b. Bugbot is set up for automated code reviews on this repo. Configure here.