Skip to content

ci(pr-checks): add workflow_dispatch trigger for manual PR re-runs#1415

Merged
IceyLiu merged 2 commits intomainfrom
zynx/feat/manual-trigger-pr-checks
Mar 18, 2026
Merged

ci(pr-checks): add workflow_dispatch trigger for manual PR re-runs#1415
IceyLiu merged 2 commits intomainfrom
zynx/feat/manual-trigger-pr-checks

Conversation

@piorpua
Copy link
Copy Markdown
Contributor

@piorpua piorpua commented Mar 18, 2026

Summary

  • Add workflow_dispatch trigger to ✅ PR Checks workflow, accepting a pr_number input so any PR can be re-checked without pushing a new commit
  • Add composite action .github/actions/checkout-pr that resolves the correct ref and base branch for both pull_request and workflow_dispatch events
  • build-test and release-script-test remain pull_request-only; only code-quality, unit-tests, coverage-tests, and i18n-check run on manual dispatch

Test plan

  • Go to GitHub Actions → ✅ PR ChecksRun workflow → enter a PR number (e.g. 1404) and confirm the 4 jobs run against that PR's head SHA
  • Verify Resolve PR context step outputs the correct HEAD_SHA and PR_BASE_REF
  • Verify Run prek checks uses PR_BASE_REF (not github.base_ref) and produces the expected diff range
  • Confirm normal pull_request events (opened / synchronize) still work as before
  • Confirm edited events are still skipped for all jobs

zynx added 2 commits March 18, 2026 20:28
- Add workflow_dispatch input `pr_number` to trigger checks on a
  specific PR without pushing a new commit
- Add composite action `.github/actions/checkout-pr` that resolves the
  correct ref for both pull_request and workflow_dispatch events
- Update code-quality, unit-tests, coverage-tests to use the new
  composite action; prek now reads PR_BASE_REF from env
- Update if conditions on all jobs to allow workflow_dispatch through;
  build-test and release-script-test remain pull_request-only
Local actions require the repo to be checked out first. Split the
composite action into two steps per job: a bare actions/checkout@v4
to make the local action available, followed by the Resolve PR Context
action which handles workflow_dispatch ref switching.
@IceyLiu IceyLiu merged commit c819c15 into main Mar 18, 2026
16 checks passed
@piorpua piorpua deleted the zynx/feat/manual-trigger-pr-checks branch March 18, 2026 12:39
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