Skip to content

Fix workflow to include permissions block with write access for issues and PRs#4275

Merged
jiaren-wu merged 2 commits intoalert-autofix-1from
copilot/fix-workflow-permissions
Oct 13, 2025
Merged

Fix workflow to include permissions block with write access for issues and PRs#4275
jiaren-wu merged 2 commits intoalert-autofix-1from
copilot/fix-workflow-permissions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 13, 2025

Thanks for the feedback on #4274. I'm creating this stack PR to address your comment and will keep this PR's description up to date as I make progress.

Original PR: #4274

Changes Made

Added a permissions block to .github/workflows/global-run-first-interaction.yaml with the appropriate permissions for the workflow to function correctly:

  • contents: read - Minimal safe default for repository access
  • issues: write - Required for the actions/first-interaction action to post comments on issues
  • pull-requests: write - Required for the actions/first-interaction action to post comments on pull requests

The workflow uses the actions/first-interaction action to greet first-time contributors with helpful messages on both issues and pull requests, which requires write permissions to post comments.

Testing

  • ✅ YAML syntax validation passes
  • ✅ Permissions are explicitly defined at the workflow level
  • ✅ Permissions match the actual operations performed by the workflow

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

@jiaren-wu
Copy link
Copy Markdown
Contributor

@copilot The workflow description mentions it 'opens a pull request' but only has contents: read permission. This configuration will likely cause the workflow to fail when attempting to create pull requests. Consider adding pull-requests: write permission or scope the required permissions at the job level.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 13, 2025

@copilot The workflow description mentions it 'opens a pull request' but only has contents: read permission. This configuration will likely cause the workflow to fail when attempting to create pull re...

Added issues: write and pull-requests: write permissions to the workflow since the actions/first-interaction action needs to post comments to issues and PRs. The workflow now has appropriate permissions for its operations. (commit edfb01d)

Copilot AI changed the title [WIP] Fix workflow to include permissions block Fix workflow to include permissions block with write access for issues and PRs Oct 13, 2025
@jiaren-wu jiaren-wu marked this pull request as ready for review October 13, 2025 17:53
@jiaren-wu jiaren-wu merged commit 610a4cc into alert-autofix-1 Oct 13, 2025
@jiaren-wu jiaren-wu deleted the copilot/fix-workflow-permissions branch October 13, 2025 17:54
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