Skip to content

ci(pstack): let the upstream sync open its pull request as you, so its checks start without approval - #23

Merged
mstephenholl merged 1 commit into
mainfrom
sync-as-a-person
Oct 19, 2026
Merged

mstephenholl merged 1 commit into
mainfrom
sync-as-a-person

Conversation

@mstephenholl

Copy link
Copy Markdown
Owner

Why

GitHub holds the checks of a pull request the Actions bot pushes. So every upstream sync pull request (#7, #14, #19, #21, #22) waited for someone to click Approve workflows to run before it could merge.

What changes

  • The sync workflow checks out, pushes, and calls gh with the PSTACK_SYNC_TOKEN secret when it is set, and with the Actions token when it is not.
  • sync-upstream.sh dispatches the early CI run, and writes the approval paragraph into the pull request body, only when the Actions bot is acting (AS_ACTIONS_BOT=true). A maintainer running the script locally also gets the quieter behavior now, since gh acts as them.
  • port/README.md says how to create the token: a fine-grained token scoped to this repository, with read and write Contents, Pull requests, and Issues.

Nothing changes until the secret is set.

Risk

An expired or revoked token fails the sync until it is renewed or the secret is deleted. The token has no Workflows or Administration permission.

Proof

test_sync_upstream.py runs the real sync-upstream.sh and merge-upstream.py against throwaway repos and a fake gh. The bot-mode test passed before the change. The person-mode test failed before it and passes after. The full suite passes (243 tests), and check.py reports 0 problems.

…s checks start without approval

GitHub holds the runs of a pull request the Actions bot pushes, so every
sync pull request waited for someone to click Approve workflows to run.
With an optional PSTACK_SYNC_TOKEN secret, the sync pushes and opens the
pull request with that token, and its checks start on their own. Without
the secret, it falls back to the Actions token and behaves as before.

The first behavior test of sync-upstream.sh runs the real script against
throwaway repos and a fake gh, in both modes.
@mstephenholl
mstephenholl merged commit b5a94f3 into main Oct 19, 2026
11 checks passed
@mstephenholl
mstephenholl deleted the sync-as-a-person branch October 19, 2026 15:06
mstephenholl added a commit that referenced this pull request Oct 20, 2026
…e scarce (#25)

## Why

GitHub's macOS arm64 runners are short on capacity. The `Install
(macos-latest, bash)` job was cancelled five times in a row today, with
the annotation "The job was not acquired by Runner of type hosted even
after multiple attempts". That failed `CI gate` on `main`, so #23 never
released, and it blocks #22.

## What changes

The install matrix drops the macOS `bash` entry. Ubuntu still tests a
current bash. The macOS `/bin/bash` job still tests bash 3.2 and macOS's
`stat` and `date`, and it got a runner on every attempt today. Each run
now needs one macOS runner instead of two.

## Risk

A bug that shows up only with a current bash on macOS's userland would
go uncaught. Neither of the other two jobs would catch it.

## Proof

`test_github_settings.py` and `check.py` pass. Merging this releases
#23's change too, since the release covers everything since v0.2.14.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant