Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 18, 2025

This PR ensures that GitHub workflows performing git push operations have the minimum required contents: write permission.

Changes Made

Added missing permissions to .github/workflows/update-version.yaml:

  • contents: write # required for pushing changes - enables git push operations
  • pull-requests: write # required for creating PR - enables PR creation

Analysis

Found three workflows that perform git push operations:

  1. .github/workflows/release-opampsupervisor.yaml - ✅ already has contents: write
  2. .github/workflows/release-builder.yaml - ✅ already has contents: write
  3. .github/workflows/update-version.yaml - ❌ was missing required permissions

The update-version.yaml workflow calls a script that performs git push -u origin "$branch_name" but was using default permissions which don't include write access to repository contents.

Fixes #43.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
@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 15:41
Copilot finished work on behalf of trask July 18, 2025 15:41
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