[WIP] Fix failing GitHub Actions job "generate"#2943
[WIP] Fix failing GitHub Actions job "generate"#2943brendandburns with Copilot wants to merge 3 commits into
Conversation
|
…erate workflow The `gh pr create` command was failing with "GitHub Actions is not permitted to create or approve pull requests" because the repository setting "Allow GitHub Actions to create and approve pull requests" is disabled. `GITHUB_TOKEN` cannot create PRs when this setting is disabled, regardless of workflow-level permissions. The fix is to use a Personal Access Token (PAT) stored as a repository secret named `GH_TOKEN` for the PR creation step. The git push step continues to use `GITHUB_TOKEN` since pushing branches is not restricted by this setting. Admins need to create a PAT (classic PAT with "repo" scope, or fine-grained PAT with "pull_requests: write" + "contents: write") and store it as the `GH_TOKEN` repository secret.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@copilot is GH_TOKEN already populated? Or would I need to inject a new token? |
The |
|
Closing, since I don't want to use a PAT for this. |
Is there a way to allow this option? |
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.