#20 CI: auto-update open PR branches #22

Merged
JMR-dev merged 1 commits from ticket-20-autoupdate-ci into main 2026-07-02 18:22:53 +00:00
JMR-dev commented 2026-07-02 18:20:02 +00:00 (Migrated from github.com)

What this does

Adds .github/workflows/autoupdate.yml. On every push to main (e.g. when a PR merges), the chinthakagodawita/autoupdate action merges the latest main into every open PR targeting it, keeping PR branches up to date automatically.

Details

  • Trigger: push to main.
  • Job: single autoupdate job on ubuntu-latest with one step.
  • Action pin: chinthakagodawita/autoupdate@0707656cd062a3b0cf8fa9b2cda1d1404d74437e (v1.7.0), pinned by commit SHA for supply-chain safety.
  • Auth: default GITHUB_TOKEN via env.
  • Permissions: minimal — contents: write, pull-requests: write.
  • Scope: PR_FILTER: "all" so all open PRs targeting the pushed branch are updated.

Known trade-off

Pushes made with the default GITHUB_TOKEN do not re-trigger downstream workflow runs, so CI won't auto-re-run purely as a result of an autoupdate push. This is documented in a comment in the workflow.

Verification

This is a GitHub Actions workflow YAML — there is no unit-testable code. The YAML was validated with js-yaml (no install, via pnpm dlx), which parsed it successfully into the expected structure:

```json
{
"name": "Autoupdate PR branches",
"on": { "push": { "branches": ["main"] } },
"permissions": { "contents": "write", "pull-requests": "write" },
"jobs": {
"autoupdate": {
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Autoupdate open PRs",
"uses": "chinthakagodawita/autoupdate@0707656cd062a3b0cf8fa9b2cda1d1404d74437e",
"env": {
"GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}",
"PR_FILTER": "all"
}
}
]
}
}
}
```

Also confirmed valid with python -c "import yaml; yaml.safe_load(...)" → ok.

Closes #20

🤖 Generated with Claude Code

## What this does Adds `.github/workflows/autoupdate.yml`. On every push to `main` (e.g. when a PR merges), the [`chinthakagodawita/autoupdate`](https://github.com/chinthakagodawita/autoupdate) action merges the latest `main` into every open PR targeting it, keeping PR branches up to date automatically. ## Details - **Trigger:** `push` to `main`. - **Job:** single `autoupdate` job on `ubuntu-latest` with one step. - **Action pin:** `chinthakagodawita/autoupdate@0707656cd062a3b0cf8fa9b2cda1d1404d74437e` (**v1.7.0**), pinned by commit SHA for supply-chain safety. - **Auth:** default `GITHUB_TOKEN` via `env`. - **Permissions:** minimal — `contents: write`, `pull-requests: write`. - **Scope:** `PR_FILTER: "all"` so all open PRs targeting the pushed branch are updated. ## Known trade-off Pushes made with the default `GITHUB_TOKEN` do **not** re-trigger downstream workflow runs, so CI won't auto-re-run purely as a result of an autoupdate push. This is documented in a comment in the workflow. ## Verification This is a GitHub Actions workflow YAML — there is no unit-testable code. The YAML was validated with `js-yaml` (no install, via `pnpm dlx`), which parsed it successfully into the expected structure: \`\`\`json { "name": "Autoupdate PR branches", "on": { "push": { "branches": ["main"] } }, "permissions": { "contents": "write", "pull-requests": "write" }, "jobs": { "autoupdate": { "runs-on": "ubuntu-latest", "steps": [ { "name": "Autoupdate open PRs", "uses": "chinthakagodawita/autoupdate@0707656cd062a3b0cf8fa9b2cda1d1404d74437e", "env": { "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}", "PR_FILTER": "all" } } ] } } } \`\`\` Also confirmed valid with `python -c "import yaml; yaml.safe_load(...)"` → `ok`. Closes #20 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.