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
Recommend GitHub App token for CI to trigger on upstack PRs (#27)
* Recommend GitHub App token to fix CI not triggering on upstack PRs
Pushes made with the default GITHUB_TOKEN don't trigger workflow runs
(GitHub's infinite-loop prevention). This means CI never runs on upstack
PRs after autorestack pushes the synthetic merge commit, so they can't
become mergeable if branch protection requires status checks.
The setup instructions now walk users through creating a GitHub App and
using actions/create-github-app-token to get an installation token. The
old GITHUB_TOKEN approach is preserved in a collapsed section for repos
that don't need CI on upstack PRs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use actions/create-github-app-token in CI instead of custom Python script
Dogfood the same approach we recommend to users. Removes the uv
dependency from CI. The Python script stays for local dev use via
run-e2e-tests.sh.
The secret changes from GH_APP_PRIVATE_KEY_PEM_B64 (base64-encoded) to
GH_APP_PRIVATE_KEY (raw PEM) — needs a corresponding update in the repo
settings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Trigger CI with new secret
* Trigger CI after re-setting secret
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,12 +57,50 @@ The action manages branch deletion itself. GitHub's auto-delete setting must be
57
57
gh api -X PATCH "/repos/OWNER/REPO" --input - <<<'{"delete_branch_on_merge":false}'
58
58
```
59
59
60
-
**2. Add the workflow**
60
+
**2. Create a GitHub App**
61
+
62
+
When autorestack pushes the synthetic merge commit to upstack branches, you probably want CI to run on those PRs so they can become mergeable. Pushes made with the default `GITHUB_TOKEN`[do not trigger workflow runs](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) — this is a deliberate GitHub limitation to prevent infinite loops. A GitHub App installation token does not have this limitation.
63
+
64
+
1.[Create a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) with the following repository permissions:
65
+
-**Contents:** Read and write (to push branches)
66
+
-**Pull requests:** Read and write (to update PRs, add labels, post comments)
67
+
2. Install the app on your repository
68
+
3. Store the App ID in a repository variable (e.g. `AUTORESTACK_APP_ID`)
69
+
4. Generate a private key and store it in a repository secret (e.g. `AUTORESTACK_PRIVATE_KEY`)
70
+
71
+
**3. Add the workflow**
61
72
62
73
Create a `.github/workflows/update-pr-stack.yml` file:
<summary>Using <code>GITHUB_TOKEN</code> instead (CI won't trigger on upstack PRs)</summary>
98
+
99
+
If you don't need CI checks on upstack PRs — for example, if your repository has no branch protection rules requiring status checks — you can use the default token:
0 commit comments