Skip to content

fix: a pull request from a fork can run CI and breakage; what needs a secret or a write is skipped - #119

Merged
ocots merged 3 commits into
mainfrom
fix/fork-safe
Oct 20, 2026
Merged

ocots merged 3 commits into
mainfrom
fix/fork-safe

Conversation

@ocots

@ocots ocots commented Oct 20, 2026

Copy link
Copy Markdown
Member

Closes #15 (the Krylov.jl approach, extended: ct-registry also needs a secret).

A pull request from a fork gets no secret and a read-only token. Until now its CI failed at Add ct-registry (Input required and not supplied: ssh-key, seen on OptimalControl.jl#804), and a breakage report would have failed with a 403 on its comment.

  • New composite action add-ct-registry: with the SSH key, julia-actions/add-julia-registry as before; without it, ct-registry (public) is added from its HTTPS URL, with General, and a notice says so. Used by ci.yml, documentation.yml, breakage.yml, breakage-suite.yml.
  • breakage.yml, breakage-suite.yml: no PR comment on a fork's PR; the report is in the run's summary (added to breakage.yml, as in Update Breakage.yml for PRs from a fork JuliaSmoothOptimizers/Krylov.jl#978). fork != true rather than == false, so that pushes and manual runs, which have no PR, still comment where they did.
  • auto-assign.yml, add-to-project.yml: skipped on a fork's PR (project_token becomes optional).
  • Not pull_request_target: CI and breakage run the PR's code.

Tested through a real fork PR (control-toolbox/CTBase.jl#630, closed): CI green on the six runners, the breakage matrix and its report green without any comment, Auto Assign and Add to Project skipped. Documentation was not exercised.

🤖 Generated with Claude Code

ocots and others added 3 commits October 20, 2026 17:35
… secret or a write is skipped with a reason

A fork's pull request gets no secret and a read-only token. ct-registry is public: without the SSH key it is added from its HTTPS URL (new composite action add-ct-registry). The breakage comment, auto-assign and add-to-project are skipped on a fork instead of failing with a 403 or an empty token; the breakage report stays in the run's summary.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ocots
ocots merged commit 72aba04 into main Oct 20, 2026
3 checks passed
@ocots
ocots deleted the fix/fork-safe branch October 20, 2026 16:24
@ocots ocots mentioned this pull request Oct 20, 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.

[Dev] Breakage update

1 participant