MCPcopy Index your code
hub / github.com/dmno-dev/bumpy / enableAutoMerge

Function enableAutoMerge

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

Enable GitHub auto-merge on a PR, trying the available merge methods in order

(rootDir: string, prNumber: string)

Source from the content-addressed store, hash-verified

1174
1175/** Enable GitHub auto-merge on a PR, trying the available merge methods in order */
1176async function enableAutoMerge(rootDir: string, prNumber: string): Promise<void> {
1177 const validPr = validatePrNumber(prNumber);
1178 for (const method of ['--squash', '--merge', '--rebase']) {
1179 try {
1180 await withPatToken(() => runArgsAsync(['gh', 'pr', 'merge', validPr, '--auto', method], { cwd: rootDir }));
1181 log.dim(` Auto-merge enabled (${method.slice(2)})`);
1182 return;
1183 } catch {
1184 // method not allowed on this repo — try the next one
1185 }
1186 }
1187 log.warn(' Failed to enable auto-merge — check repository merge settings and token permissions.');
1188}
1189
1190/** Channel-aware `ci plan`: reports what `ci release` would do on this channel branch */
1191async function ciChannelPlan(

Callers 1

createChannelReleasePrFunction · 0.85

Calls 3

runArgsAsyncFunction · 0.90
validatePrNumberFunction · 0.85
withPatTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…