Fix minimum token permissions for workflows that perform git push #22
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 adds the required
contents: write
permission to GitHub workflows that perform git push operations.Changes Made
contents: write
permission to the action jobcontents: write
permission to the action jobBoth workflows execute npm scripts (
do-sandbox-repo-merge
anddo-sandbox-staging-merge
) that ultimately call thepushToBranch
function in the sandbox-tools/merge-repos scripts, which performs git push operations to update the repository.Why This Fix is Needed
Without explicit permissions, GitHub Actions workflows default to read-only access. These workflows need write access to push changes back to the repository, but were missing the required
contents: write
permission.Implementation Details
Each permission line includes the trailing comment "required for pushing changes" as specified in the issue requirements. The changes are minimal and follow GitHub Actions best practices for token permissions.
Fixes #21.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.