Skip to content

Commit 5877ff9

Browse files
Phlogistiqueclaude
andauthored
Fix README setup instructions to match actual workflow (#22)
* Fix README setup instructions to match actual workflow - Simplified workflow setup to match actual .github/workflows/update-pr-stack.yml - Added critical requirement to disable auto-delete head branches - Included both UI and CLI methods for disabling auto-delete (following e2e test pattern) - Removed unnecessary permissions (repository-projects: read) - Removed redundant checkout steps and job conditionals * Apply suggestion from @Phlogistique --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent cdb7140 commit 5877ff9

1 file changed

Lines changed: 17 additions & 26 deletions

File tree

README.md

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,24 @@ After you manually resolve the conflict and push:
4444

4545
### Setup
4646

47+
**1. Disable auto-delete head branches**
48+
49+
The action manages branch deletion itself. GitHub's auto-delete setting must be disabled:
50+
51+
**Via Settings:**
52+
- Go to your repository Settings → General → Pull Requests
53+
- Uncheck "Automatically delete head branches"
54+
55+
**Via GitHub CLI:**
56+
```bash
57+
gh api -X PATCH "/repos/OWNER/REPO" --input - <<< '{"delete_branch_on_merge":false}'
58+
```
59+
60+
**2. Add the workflow**
61+
4762
Create a `.github/workflows/update-pr-stack.yml` file:
4863
```yaml
49-
name: Update Stacked PRs on Squash Merge
64+
name: Update PR Stack
5065

5166
on:
5267
pull_request:
@@ -55,38 +70,14 @@ on:
5570
permissions:
5671
contents: write
5772
pull-requests: write
58-
repository-projects: read
5973

6074
jobs:
6175
update-pr-stack:
62-
if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.merge_commit_sha != ''
6376
runs-on: ubuntu-latest
6477
steps:
65-
- name: Checkout repository
66-
uses: actions/checkout@v3
67-
with:
68-
fetch-depth: 0
69-
70-
- name: Update PR stack
71-
uses: Phlogistique/autorestack-action@main
72-
with:
73-
github-token: ${{ secrets.GITHUB_TOKEN }}
74-
75-
continue-after-conflict-resolution:
76-
if: github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'autorestack-needs-conflict-resolution')
77-
runs-on: ubuntu-latest
78-
steps:
79-
- name: Checkout repository
80-
uses: actions/checkout@v3
81-
with:
82-
fetch-depth: 0
83-
84-
- name: Continue PR stack update
85-
uses: Phlogistique/autorestack-action@main
78+
- uses: Phlogistique/autorestack-action@main
8679
with:
8780
github-token: ${{ secrets.GITHUB_TOKEN }}
88-
mode: conflict-resolved
89-
pr-branch: ${{ github.event.pull_request.head.ref }}
9081
```
9182
9283
### Notes

0 commit comments

Comments
 (0)