@@ -12,14 +12,25 @@ The `trigger-downstream` job in `.github/workflows/build.yml` runs after the
1212
13131 . Sets ** pending** commit statuses on the PR (` cross-repo / commcare-android `
1414 and ` cross-repo / formplayer ` )
15- 2 . Fires ` workflow_dispatch ` to each downstream repo, passing the PR's head SHA,
16- PR number, and check name
15+ 2 . Fires ` workflow_dispatch ` to each downstream repo, passing:
16+ - ` commcare_core_sha ` — the PR's ** merge commit** SHA (the same code the
17+ ` build ` job tested)
18+ - ` commcare_core_status_sha ` — the PR's ** head commit** SHA (for reporting
19+ status back to the correct commit on the PR)
20+ - ` commcare_core_pr ` — the PR number
21+ - ` commcare_core_check_name ` — the status check name
17223 . Exits immediately (fire-and-forget)
1823
1924Each downstream repo's CI workflow accepts these inputs via ` workflow_dispatch ` .
20- When present, it checks out the specified commcare-core SHA instead of its
21- default, runs tests, and reports the result back as a commit status on the
22- commcare-core PR.
25+ When present, it checks out commcare-core at ` commcare_core_sha ` (the merge
26+ commit) instead of its default, runs tests, and reports the result back as a
27+ commit status on the commcare-core PR using ` commcare_core_status_sha ` (the
28+ head commit).
29+
30+ The merge commit is used for checkout so that downstream repos test the same
31+ code that commcare-core's own build tested — i.e., the PR's changes merged
32+ into the base branch. The head SHA is used for status reporting because GitHub
33+ associates PR status checks with the head commit, not the merge commit.
2334
2435## Authentication
2536
0 commit comments