Repository navigation
Use the PR base branch to pick the template in template app workflows - #60559
Merged
gabrieldonadel merged 1 commit intoDec 5, 2026
Merged
gabrieldonadel merged 1 commit into
gabrieldonadel merged 1 commit into
Conversation
gabrieldonadel
marked this pull request as ready for review
December 4, 2026 17:42
gabrieldonadel
force-pushed
the
@gabrieldonadel/0.88-template-e2e-base-ref
branch
from
December 4, 2026 17:43
2b3447d to
544b5f4
Compare
gabrieldonadel
marked this pull request as draft
December 4, 2026 17:44
On a pull request `github.ref_name` is `<number>/merge`, which has no
`-stable` in it, so the template app workflows fall back to the template's
`main` branch even when the PR targets a stable branch. On main that is
harmless, since `main` is the right template there. But every stable branch
is cut from main with these files, and its PRs then build and test against
template `main` instead of the matching stable template.
On 0.88-stable this breaks every PR: template `main` pins
@react-native-community/cli 22.0.0-alpha.0, which no longer exports
`createDevServerMiddleware`, so Metro exits with "createCommunityMiddleware
is not a function" and test_e2e_{ios,android}_templateapp fail in all three
attempts, while pushes to the branch pass.
Use `github.base_ref` when it is set, as 0.89-stable already does in its iOS
template workflows. Pushes are unchanged, since `base_ref` is empty there.
Signed-off-by: Gabriel Donadel <donadeldev@gmail.com>
gabrieldonadel
force-pushed
the
@gabrieldonadel/0.88-template-e2e-base-ref
branch
from
December 4, 2026 17:45
544b5f4 to
c47fa00
Compare
gabrieldonadel
marked this pull request as ready for review
December 4, 2026 17:49
cortinico
approved these changes
Dec 4, 2026
gabrieldonadel
added a commit
that referenced
this pull request
Dec 5, 2026
…#60559) On a pull request `github.ref_name` is `<number>/merge`, which has no `-stable` in it, so the template app workflows fall back to the template's `main` branch even when the PR targets a stable branch. On main that is harmless, since `main` is the right template there. But every stable branch is cut from main with these files, and its PRs then build and test against template `main` instead of the matching stable template. On 0.88-stable this breaks every PR: template `main` pins @react-native-community/cli 22.0.0-alpha.0, which no longer exports `createDevServerMiddleware`, so Metro exits with "createCommunityMiddleware is not a function" and test_e2e_{ios,android}_templateapp fail in all three attempts, while pushes to the branch pass. Use `github.base_ref` when it is set, as 0.89-stable already does in its iOS template workflows. Pushes are unchanged, since `base_ref` is empty there. Signed-off-by: Gabriel Donadel <donadeldev@gmail.com> (cherry picked from commit 01ec383)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The template app workflows pick the template branch from
github.ref_name. On a pull request that is<number>/merge, which has no-stablein it, so they fall back to the template'smainbranch even when the PR targets a stable branch.On
mainthis is harmless, since templatemainis the right one there. But every stable branch is cut frommainwith these files, and its PRs then build and test against templatemaininstead of the matching stable template.On
0.88-stablethis breaks every PR (#60477, #60550, #60553): the PR run installsreact-native-community-template-0.83.0-main.tgz, while the branch run installs0.88.1. Templatemainpins@react-native-community/cli22.0.0-alpha.0, whosebuild/index.jsno longer exportscreateDevServerMiddleware. On 0.88,loadCommunityMiddlewarereads exactly that export, soreact-native startexits withcreateCommunityMiddleware is not a function. The Debug app shows "No script URL provided" and Maestro failsstart.ymlin all three attempts.This uses
github.base_refwhen it is set, inbuild-android-templateapp.yml,build-ios-templateapp.yml,e2e-android-templateapp.ymlande2e-ios-templateapp.yml.0.89-stablealready has this change in its two iOS files (#60264). Pushes are unchanged, sincebase_refis empty there.Needs cherry-picks
This fixes future branch cuts. The branches already cut need it picked:
0.88-stable: onlye2e-android-templateapp.ymlande2e-ios-templateapp.ymlexist there. The build workflows are not on that branch, so the pick conflicts on those two files and drops them.0.89-stable: the iOS files already have it, so onlybuild-android-templateapp.ymlande2e-android-templateapp.ymlchange.Changelog:
[INTERNAL] [FIXED] - Use the PR base branch to pick the template in template app workflows
Test Plan:
mainnothing changes in practice: for a PR againstmain,base_refismain, which is also what the fallback picked.test_e2e_{ios,android}_templateappshould clone the stable template and pass.