Skip to content

Run CI when copy-pr-bot creates PR refs#9

Closed
pnwamk wants to merge 3 commits into
mainfrom
pnwamk/run-ci-on-pr-open
Closed

Run CI when copy-pr-bot creates PR refs#9
pnwamk wants to merge 3 commits into
mainfrom
pnwamk/run-ci-on-pr-open

Conversation

@pnwamk

@pnwamk pnwamk commented May 7, 2026

Copy link
Copy Markdown
Collaborator

The hypothesis for why CI appears to not run on PRs at the moment when expected: copy-pr-bot creates pull-request/N refs when a PR opens, but the CI workflow is only configured currently to watch push events. A branch create event can therefore leave a PR with no checks until a later update pushes the mirror ref.

This PR changes that in an attempt to fix the issue (CI should run here successfully if the hypothesis is correct) by adding watch on the create event as well (but checks are added to ensure we do not run the CI on ANY branch creation event, it needs to be a pull-request branch).

copy-pr-bot creates pull-request/N refs when PRs open, but the CI
workflow only watched push events. A branch create event can therefore
leave a PR with no checks until a later update pushes the mirror ref.

Trigger CI on create events and gate the root jobs so only
pull-request/N branch creation starts the matrix. Later mirror pushes,
main pushes, tags, and manual dispatch keep the existing behavior.
@pnwamk

pnwamk commented May 7, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 50eac4f

nv-asrikanth
nv-asrikanth previously approved these changes May 7, 2026
The create-event experiment proved that CI can run on copy-pr-bot's
pull-request/N refs, but GitHub does not associate those check suites
with the actual pull request. That leaves the PR page without visible
checks even when the workflow succeeds.

Add a pull_request trigger for PRs targeting main so GitHub attaches the
check suite to the PR head branch. Keep the existing push triggers for
pull-request/N mirror updates, main, tags, and manual dispatch.
Remove the temporary pull_request trigger that was added to test GitHub's
PR check association behavior. CompileIQ's intended PR CI path is still
copy-pr-bot updating pull-request/N refs and Actions running from those
push events.

Keeping full CI off direct pull_request events preserves the copy-pr-bot
approval gate while we debug why the first manual /ok to test copy is not
producing the expected push workflow run.
@pnwamk

pnwamk commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author

This PR was investigative to try and learn more about why copy-pr-bot seems to miss running CI for a PR.

Summary from the investigation:

We’ve seen a case where copy-pr-bot appears to have created the initial pull-request/N branch for a PR, but CI did not attach to the PR for that SHA (i.e., the PR did not get the indirect approval it was supposed to reflected back to it). If you hit that, try a harmless follow-up commit so the bot updates its pull-request/N branch. In PR #7, the bot's branch update, not initially creating the branch, seemed to produce a CI run that was associated with the original pull request immediately. If we see this more we'll have to investigate furtner.

Closing this ticket.

@pnwamk pnwamk closed this May 8, 2026
@pnwamk pnwamk deleted the pnwamk/run-ci-on-pr-open branch May 8, 2026 18:17
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.

2 participants