Problem
packages/create-cedar-rsc-app/publish.ts unconditionally runs git push --follow-tags, but it should first check whether an upstream remote is configured. If it is, it should push to upstream (the canonical repo) rather than origin (the fork).
The commented-out code makes the intent clear:
// TODO: Check if there is an upstream remote, if so, use that
// await `git push upstream --follow-tags`
await `git push --follow-tags`
A maintainer running this from a fork will push the version tag to their fork rather than the main repo.
Fix
Check the list of git remotes before pushing. If upstream is present, push to it; otherwise fall back to the current default.
const remotes = (await $`git remote`).stdout.trim().split('\n')
if (remotes.includes('upstream')) {
await $`git push upstream --follow-tags`
} else {
await $`git push --follow-tags`
}
Files to change
packages/create-cedar-rsc-app/publish.ts — replace the unconditional git push with a remote-aware branch (lines 61–63)
Problem
packages/create-cedar-rsc-app/publish.tsunconditionally runsgit push --follow-tags, but it should first check whether anupstreamremote is configured. If it is, it should push toupstream(the canonical repo) rather thanorigin(the fork).The commented-out code makes the intent clear:
A maintainer running this from a fork will push the version tag to their fork rather than the main repo.
Fix
Check the list of git remotes before pushing. If
upstreamis present, push to it; otherwise fall back to the current default.Files to change
packages/create-cedar-rsc-app/publish.ts— replace the unconditionalgit pushwith a remote-aware branch (lines 61–63)