MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / pushWithToken

Function pushWithToken

packages/bumpy/src/commands/ci.ts:699–719  ·  view source on GitHub ↗

* Push a branch to origin, optionally using a custom GitHub token. * * When `BUMPY_GH_TOKEN` is set, the remote URL is temporarily rewritten to * include the token. Pushes made with a PAT or GitHub App token bypass * GitHub's anti-recursion guard, allowing `pull_request` workflows to fire * on

(rootDir: string, branch: string, config: BumpyConfig)

Source from the content-addressed store, hash-verified

697 * bumpy ci release --snapshot pr-${{ github.event.pull_request.number }}
698 *
699 * Re-running on a new commit republishes and floats the dist-tag (and the comment updates
700 * in place). On forks the publish token and PR-comment token are unavailable — expected,
701 * since snapshots target a registry only trusted contributors can publish to.
702 */
703async function ciSnapshotRelease(rootDir: string, opts: ReleaseOptions): Promise<void> {
704 const { publishCommand } = await import('./publish.ts');
705 const outcome = await publishCommand(rootDir, { snapshot: opts.snapshot, tag: opts.tag });
706 if (!outcome || outcome.published.length === 0) return;
707
708 const prNumber = detectPrNumber();
709 if (!prNumber) {
710 log.dim(' No PR detected — skipping snapshot install-instructions comment.');
711 return;
712 }
713 const pm = await detectPackageManager(rootDir);
714 const comment = formatSnapshotComment(outcome.snapshot, outcome.published, pm);
715 await postOrUpdatePrComment(prNumber, comment, rootDir, SNAPSHOT_COMMENT_MARKER);
716}
717
718// ---- Token-aware push ----
719
720/**
721 * Push a branch to origin, optionally using a custom GitHub token.
722 *

Callers 2

createVersionPrFunction · 0.85
createChannelReleasePrFunction · 0.85

Calls 2

withGitTokenFunction · 0.90
runArgsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…