Skip to content

Commit 02535b4

Browse files
committed
Fix GitHub Actions PR creation permission errors by standardizing token usage and adding documentation.
## Summary Fixed PR creation failures in GitHub Actions workflows by standardizing token usage to `github.token` and adding clear documentation headers explaining the required repository permission setting. ## Files Changed ### Modified (2 files) - `.github/workflows/dispatch-erk-queue.yml` - Added documentation header with required repository setting - `.github/workflows/implement-plan.yml` - Added documentation header and standardized token reference ## Key Changes - Standardized token usage in `implement-plan.yml` checkout action from `${{ secrets.GITHUB_TOKEN }}` to `${{ github.token }}` - Added identical documentation headers to both workflow files explaining the required "Allow GitHub Actions to create and approve pull requests" repository setting - Provided clear error message context in documentation for troubleshooting PR creation failures ## Critical Notes - GitHub token permission setting must be enabled in repository settings under Actions > General > Workflow permissions for workflows to successfully create pull requests
1 parent 5d2704e commit 02535b4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/dispatch-erk-queue.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# REQUIRED REPOSITORY SETTING:
2+
# Settings > Actions > General > Workflow permissions
3+
# ✓ Enable "Allow GitHub Actions to create and approve pull requests"
4+
#
5+
# Without this setting, PR creation will fail with:
6+
# "GitHub Actions is not permitted to create or approve pull requests"
7+
18
name: Dispatch Erk Queue
29

310
on:

.github/workflows/implement-plan.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# REQUIRED REPOSITORY SETTING:
2+
# Settings > Actions > General > Workflow permissions
3+
# ✓ Enable "Allow GitHub Actions to create and approve pull requests"
4+
#
5+
# Without this setting, PR creation will fail with:
6+
# "GitHub Actions is not permitted to create or approve pull requests"
7+
18
name: Implement Plan
29

310
on:
@@ -22,7 +29,7 @@ jobs:
2229
- uses: actions/checkout@v4
2330
with:
2431
ref: ${{ inputs.branch-name || github.ref }}
25-
token: ${{ secrets.GITHUB_TOKEN }}
32+
token: ${{ github.token }}
2633

2734
- name: Check for submission
2835
id: check_submission

0 commit comments

Comments
 (0)