Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 18, 2025

This PR adds the required contents: write permission to GitHub workflows that perform git push operations.

Changes Made

  • auto-merge-repo-staging.yml: Added contents: write permission to the action job
  • auto-merge-staging-main.yml: Added contents: write permission to the action job

Both workflows execute npm scripts (do-sandbox-repo-merge and do-sandbox-staging-merge) that ultimately call the pushToBranch 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.

permissions:
  contents: write  # required for pushing changes

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.

@Copilot Copilot AI changed the title [WIP] Fix minimum token permissions if needed Fix minimum token permissions for workflows that perform git push Jul 18, 2025
@Copilot Copilot AI requested a review from trask July 18, 2025 16:27
Copilot finished work on behalf of trask July 18, 2025 16:27
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.

Fix minimum token permissions if needed

2 participants