You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .opencode/commands/ghar-issue-fix.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -557,9 +557,26 @@ git push
557
557
558
558
### PR creation fails
559
559
560
-
- Check if PR already exists for branch
561
-
- Check for permission issues
562
-
- Provide manual gh command
560
+
1. Check if a PR already exists for the branch: `gh pr list --head {branch-name}`
561
+
- If yes → use that PR, continue
562
+
2. Check the error message:
563
+
-**"GitHub Actions is not permitted to create or approve pull requests"** → This is a repository-level setting blocking PR creation. Note: the workflow already declares `pull-requests: write` — that is **not** the problem. The repo admin must enable the feature separately.
564
+
-**STOP** — do NOT continue to the self-review or archive phases
565
+
- Output clearly:
566
+
```
567
+
❌ PR creation blocked by GitHub Actions permissions.
568
+
569
+
The branch has been pushed: {branch-url}
570
+
571
+
To fix (repo admin required):
572
+
Settings → Actions → General → Workflow permissions
573
+
→ Enable "Allow GitHub Actions to create and approve pull requests"
574
+
575
+
To create the PR manually in the meantime, run:
576
+
gh pr create --title "{title}" --head {branch-name} --base main
577
+
```
578
+
- **Other permission / auth error** → STOP with the error message and suggest using a PAT with `repo` scope
579
+
3. Only provide a manual `gh pr create` command and STOP — do NOT proceed to Phase 8 (review) or Phase 9 (archive) without a real PR number
0 commit comments