Skip to content

fix(sync): the React Native sync merges its pull request itself - #353

Merged
Xyzcancer merged 1 commit into
masterfrom
fix/rn-mirror-automerge
Sep 30, 2026
Merged

Xyzcancer merged 1 commit into
masterfrom
fix/rn-mirror-automerge

Conversation

@Xyzcancer

@Xyzcancer Xyzcancer commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The React Native sync takes a GitHub App token and opens the target pull request through the shared pull-request/create action, which merges it at once.
  • Before committing it runs yarn install --mode=update-lockfile in the target: the source keeps one monorepo lockfile, so new dependencies used to fail the target's immutable install.
  • The target repository is an input (targetRepository) instead of being written into the workflow.
  • The shared action passes --repo to gh pr merge; a bare number resolved against the source checkout in the React Native job.

Callers pass targetRepository, appId and appSecret instead of token. The app must be installed on the target repository.

The React Native sync pushed to the target repository with a personal
bot token and only opened a pull request, so every release waited for
someone to merge it by hand. It also copied package.json without
touching the target's lockfile: the source keeps one lockfile for the
whole monorepo, so a new dependency failed the target's immutable
install.

The sync now takes a GitHub App token, brings the target lockfile in
line with the synced package.json, and opens the pull request through
the shared create action, which merges it at once. The target
repository is an input rather than written into the workflow. The token
is created first, so an app without access to the target fails every
run rather than only a release that has changes.

The shared action now names the repository when it merges. It passed a
bare number, which gh resolves against the checkout in the working
directory; in the React Native job that is the source repository, not
the target the pull request was opened in.
@Xyzcancer
Xyzcancer force-pushed the fix/rn-mirror-automerge branch from 32271f8 to 7a118dc Compare September 30, 2026 14:53
@Xyzcancer Xyzcancer changed the title fix(sync): the React Native mirror merges like the native ones fix(sync): the React Native sync merges its pull request itself Sep 30, 2026
@Xyzcancer
Xyzcancer merged commit 7528187 into master Sep 30, 2026
1 check passed
@Xyzcancer
Xyzcancer deleted the fix/rn-mirror-automerge branch September 30, 2026 14:58
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.

1 participant