Skip to content

Private repositories: run once per pull request, when it becomes ready - #3

Merged
kalidke merged 2 commits into
mainfrom
ci/private-once-per-pr
Nov 16, 2026
Merged

kalidke merged 2 commits into
mainfrom
ci/private-once-per-pr

Conversation

@kalidke

@kalidke kalidke commented Nov 14, 2026

Copy link
Copy Markdown
Member

What changes

In a private repository, the test, qa and format jobs of julia-ci.yml now run:

  • once when a pull request becomes ready for review: opened or reopened when it is not a draft, or ready_for_review;
  • on workflow_dispatch.

They no longer run on a later push to an open pull request (synchronize). Push and schedule already skipped. A public repository runs exactly what it ran before. The callers (templates/CI.yml) do not change.

Why: hosted minutes on a private repository are paid, and a run on every push to a pull request repeats what the local test record already checks (admiral decision 0025).

To test a later commit on GitHub, start the CI workflow by hand on the branch (Actions tab, or gh workflow run CI.yml --ref <branch>).

How

The job conditions stay an allow-list. The pull_request clause now also requires github.event.action to be one of opened, reopened, ready_for_review; a public repository still passes through its own clause on every event.

A new boolean input, assume-private (default false), removes the public clauses, so a public repository can run the private schedule. It cannot make a private repository run more. The self-test uses it to exercise the private schedule in this public repository.

Self-test

selftest.yml now calls the workflow twice, as the public repository and with assume-private, and a last job, Expected jobs ran, restates the rule from the event and fails unless exactly those jobs ran and succeeded.

Results on this pull request are listed in a comment below.

Known behavior, unchanged callers

The caller cancels an in-progress run when a newer pull request event arrives. In a private repository a push while the one run is still going therefore cancels it, and the new run skips every job. The README says so.

🤖 Generated with Claude Code

kalidke and others added 2 commits November 14, 2026 13:37
In a private repository the test, QA and Runic jobs ran on every push to an
open pull request. They now run when a pull request is opened or reopened as
not a draft, or when a draft is marked ready, and on manual dispatch. A later
push to the pull request skips every job, as push and schedule already did.
Public repositories are unchanged.

The new assume-private input removes the public clauses from the job
conditions, so the self-test can run the private schedule in this public
repository. The self-test calls the workflow twice, with and without it, and
a last job fails unless exactly the jobs expected for the event ran.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ivate input

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kalidke
kalidke marked this pull request as draft November 14, 2026 20:44
@kalidke kalidke closed this Nov 14, 2026
@kalidke kalidke reopened this Nov 14, 2026
@kalidke
kalidke marked this pull request as ready for review November 14, 2026 20:44
@kalidke

kalidke commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Self-test results

Head 6beaf94. "Private set" is the call with assume-private: Core - Julia 1, QA, Runic. "Public set" is the plain call: Core - Julia min, Core - Julia 1, Core - lowest compat, QA, Runic. In every run below the Expected jobs ran job passed.

Event Run Public set Private set
push to the branch 43638776509 ran skipped
pull request opened, not a draft 43638522388 (on d788197) ran ran
later push to the pull request (synchronize) 43638780341 ran skipped
reopened while a draft 43639093279 skipped skipped
draft marked ready (ready_for_review) 43639122413 ran ran
workflow_dispatch on the branch 43639121824 ran ran

The check has teeth: on a throwaway branch (deleted) whose gate ignored assume-private, the private set ran on a push and Expected jobs ran failed, run 43639454995.

Not tested here: a job running in a real private repository under this change. What the private schedule rests on, and how each was checked:

  • The called workflow sees the caller's github.event.action: shown by the runs above for a call within this repository. GitHub documents that a called workflow's github context is the caller's.
  • The called workflow sees the caller's github.event.repository.private and github.event.pull_request.draft when called from another organization's private repository: shown by existing runs of the released v2, where pull request runs in a private caller tested Julia 1 only, and draft pull requests skipped every job. The action comes from the same event payload.

@kalidke
kalidke merged commit 35efc65 into main Nov 16, 2026
69 checks passed
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