Skip to content

fix(auto-merge): wait for a new PR's checks, and test this repo's copy of the action - #130

Open
shimoncohen wants to merge 2 commits into
masterfrom
fix/auto-merge-wait-for-checks
Open

shimoncohen wants to merge 2 commits into
masterfrom
fix/auto-merge-wait-for-checks

Conversation

@shimoncohen

@shimoncohen shimoncohen commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The auto-merge action fails on a PR opened in the same job, and its e2e test never tested this repo's copy of the action.

  • Action: it called gh pr checks --watch before a new PR's checks exist, and gh exits 1 with "no checks reported". It now polls for up to a minute until the PR has checks. Any other gh error still fails at once, and a PR that never gets checks fails as before.
  • E2E test: test-site was checked out with no path, so it replaced this repo in the workspace. ./actions/auto-merge then ran test-site's stale copy of the action. test-site now goes in test-site/. That also replaces the repository input that create-pull-request doesn't define, so this covers what ci: drop the repository input create-pull-request does not define #129 does.

Tests: test-action-with-labels passes, and it merged its test PR (MapColonies/test-site#158). The first run on this PR failed only because one of test-site's own checks hit a transient error loading a helm repo index ("empty index.yaml file"); rerunning that check and then the e2e job passed. actionlint reports no errors on the workflow.

…ng them

gh pr checks --watch exits 1 with "no checks reported" when called before
a just-opened PR's checks exist, so the action failed on PRs opened in
the same job. The e2e test hit this: the PR was created at 18:02:14 and
its checks started at 18:02:18. The action now polls for up to a minute
until checks appear; other gh errors still fail at once.
Without a path, the test-site checkout replaced this repo in the
workspace, so ./actions/auto-merge resolved to the stale copy that
test-site carries and the job never tested this repo's action. The
empty commit and create-pull-request now use test-site/, which also
replaces the repository input create-pull-request does not define.
@shimoncohen shimoncohen changed the title fix(auto-merge): wait for a new PR's checks to register before watching them fix(auto-merge): wait for a new PR's checks, and test this repo's copy of the action Dec 3, 2026
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