From 6ec4cb79b1a61d853d9f71bf902ed29d03545cfc Mon Sep 17 00:00:00 2001 From: Wayland Date: Sat, 12 Sep 2026 10:17:16 +0200 Subject: [PATCH] ci: run PR workflows on every base branch The `pull_request` trigger in `ci.yml` and `smoke-test.yml` was pinned to `main`, so a pull request opened against any other base branch got no lint, build or test run at all - only the unconditional metadata checks. GitHub resolves a `pull_request` workflow definition from the PR's own tree, never from the default branch, so the patch has to be present in the branch under test. `push` stays pinned to `main`. Also document the mechanics: why a default-branch-only edit is a no-op, how to cut a review base so the trigger patch stays out of the review diff, that the patch must not be forwarded upstream, and that the dependency graph behind `dependency-review` is a repository setting rather than anything in the workflow files. Co-Authored-By: Wayland Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 1 - .github/workflows/smoke-test.yml | 1 - docs/fork-ci-review-bases.md | 72 ++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 docs/fork-ci-review-bases.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fbd2c325..5adbf5063 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index ecccce0e4..ea9ddac5d 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -6,7 +6,6 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/docs/fork-ci-review-bases.md b/docs/fork-ci-review-bases.md new file mode 100644 index 000000000..af27f1125 --- /dev/null +++ b/docs/fork-ci-review-bases.md @@ -0,0 +1,72 @@ +# Fork CI: review bases + +This page is fork-local (`Flopsstuff/uemcp`). It describes how to get real CI +signal on a pull request whose base branch is **not** `main`, which is the +normal shape of work here: a change is reviewed against a verbatim snapshot of +`upstream/dev` before it is forwarded upstream. + +## Why patching `main` is not enough + +`ci.yml` and `smoke-test.yml` upstream declare: + +```yaml +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +``` + +With that `pull_request` filter, a PR into `base/upstream-dev-*` runs only the +unconditional metadata checks (Labeler, Greetings, Validate PR Title) - no lint, +no build, no tests. A grey check list is easy to misread as "nothing to run". + +Removing the filter on the fork's default branch alone changes nothing, because +GitHub Actions resolves a workflow definition for `pull_request` from **the tree +of the pull request itself** (its head, or the generated merge commit) - never +from the default branch. Only `schedule`, `workflow_dispatch`, `workflow_run` +and `repository_dispatch` read their definition from the default branch. + +So the trigger patch has to be present in the branch under test. It is two +deletions: + +```yaml +on: + push: + branches: [ main ] # unchanged + pull_request: # no branches filter - any base +``` + +## Cutting a new review base + +1. `git fetch upstream` +2. Push the snapshot commit as the base branch: + `git push origin :refs/heads/base/upstream-dev-floNNN` +3. Commit the trigger patch **on top of that base branch** and push it. +4. Cut the feature branch from the already-patched base, then open the PR into + it. + +The patch commit is then present on both sides of the comparison, so +`base..head` stays a clean review diff, while the workflow definitions in the +PR tree still have no `branches` filter and CI starts. + +If the base was pushed as a bare snapshot and the patch went onto the feature +branch instead, CI still runs (the PR tree is what matters), but the patch shows +up as `-2` lines in the review diff. Prefer the base-plus-patch shape for +anything a human has to read. + +## Do not forward the patch upstream + +When a fork change is forwarded to `ChiR24/Unreal_mcp`, cherry-pick only the +substantive commits. The trigger patch exists because we review against +non-`main` bases; upstream does not, and the filter is deliberate there. + +## Dependency graph is a repository setting + +`dependency-review` on the fork used to fail unconditionally because the +dependency graph was disabled, not because of anything in +`.github/workflows/dependency-review.yml`. It was enabled via the repository's +vulnerability-alerts / dependency-graph setting (`PUT +/repos/Flopsstuff/uemcp/vulnerability-alerts`). There is nothing to look for in +the workflow files - if that check goes unconditionally red again, check the +repository settings first.