Repository navigation
Conversation
Code Review ✅ Approved🔴 High risk · Moving 31 CI workflows to pull_request and revising secret/write gates could expose credentials or disrupt required checks if trust conditions misfire. Backports the CI hardening from #35426 to the 2.1 release branch, moving PR code execution from VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Release-branch backport of #35426 to the newly created
2.1branch. Merge this before #35426. No linked issue: the same CI hardening change, usingskip-pr-checksas on the existing backports.Converts workflows that execute PR code from
pull_request_targettopull_request, removes thesafe to testlabel gate and team labeler, and restricts secret-backed steps and PR writes to same-repository, non-Dependabot PRs. Forks receive job summaries and annotations. Metadata-only workflows retainpull_request_targetwithout checking out PR code.The 31-file change exactly matches source commit
74aa489b49c8b70a06b4215772f1834ca3bbb8e1on every touched path, including the separate Playwright ingestion-image preparation job. Changes already present on2.1, including the MSSQL CLI test matrix, remain intact.Type of change:
High-level design:
Uses the design and accepted decision in #35426 and
ADR:2026-10-14-pr-code-never-runs-on-pull-request-target; the decision record is included in this backport.pull_requestreads the target branch's workflow copies. Preparing2.1before switchingmainprevents its PR checks from disappearing during rollout. Active release-line backports are2.0(#35433),2.1(this PR), and1.13(#35435). Future2.0.xbranches inherit the change from2.0; already released patch branches need no independent backport. The old2.0.5PR #35434 is closed.The main rollout still enables
require_last_push_approvalinmerge-ruleswhen #35426 lands. Until then, oldmain-ownedpull_request_targetruns may overlap the newpull_requestruns and cancel one another; cancelled legacy runs may need a one-time rerun.Tests:
Use cases covered
Unit tests
source env/bin/activate && python -m pytest .github/scripts/tests -q --tb=short: 328 passed, 5 failed. All five failures reproduce on unmodifiedorigin/2.1: unavailable first-attempt metrics, Basic-project exclusions, schema-search tagging, summary-job condition, and retry-policy text. No new test failures.Backend integration tests
Not applicable: no Java, schema, migration, or backend API changes.
Ingestion integration tests
Not applicable: no ingestion implementation changes.
Playwright (UI) tests
Not run: no UI implementation changes. Existing CI script tests cover workflow planning, cache assets, merge-group validation, and summary redaction.
Manual testing performed
actionlinton all 20 changed workflows against the2.1baseline: 9 existing findings before and after; zero new findings.pull_request_target.node --check .github/scripts/render_playwright_summary.cjs, the decision-record checker,git diff --check, and commit hooks passed.UI screen recording:
Not applicable: CI configuration only.
Checklist:
skip-pr-checkslike the existing backports.REVIEW.md: fresh-context review of commit055c21981d713b3b0aaecaac6ff3108143e20032found no blockers. Target-branch local references and Collate2.1dispatch compatibility were verified; static-only CI coverage is inherited from the accepted source change.

Confidence Score: 5/5
The PR appears safe to merge under the stated rollout plan.Summary
Moves PR-code workflows to
pull_request, removes thesafe to testgate, and retires the team labeler.Acknowledged rollout decisions:
pmbrullexplicitly defers enablingrequire_last_push_approvaluntil ci: run PR code on pull_request only and retire the safe to test label #35426 lands.pmbrullacknowledges overlapping legacy runs during rollout and possible one-time reruns.pmbrullidentifies static-only CI coverage as inherited from the accepted source change.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD PR[PR opened or updated] --> Checks[Run code with pull_request] Checks --> Origin{Same repository and not Dependabot?} Origin -->|Yes| Integrations[Allow secret-backed steps and PR comments] Origin -->|No| Summary[Checks and job summaries without privileged writes] Summary --> Queue[Merge queue] Queue --> Fallback[Run deferred Collate and data-access checks]Reviews (1) · Last reviewed commit: "ci: backport PR workflow hardening to 2...." · Reviewed by Greptile