Skip to content

Commit cf85d52

Browse files
theoephraimclaude
andcommitted
Improve non-GitHub handling in ci setup and push
Clarify that ci setup only supports GitHub-hosted repos. Only show the BUMPY_GH_TOKEN warning when running on GitHub Actions, since other CI providers don't have the same anti-recursion limitation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 88a9dc5 commit cf85d52

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

packages/bumpy/src/commands/ci-setup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export async function ciSetupCommand(rootDir: string): Promise<void> {
1717
// Detect repo and package manager context
1818
const repo = detectRepo(rootDir);
1919
if (!repo) {
20-
log.error('Could not detect GitHub repository. Run this from a repo with a GitHub remote.');
20+
log.error(
21+
'Could not detect a GitHub repository.\n' +
22+
' This command currently only supports GitHub-hosted repos.\n' +
23+
' Make sure you have a GitHub remote (git remote -v).',
24+
);
2125
process.exit(1);
2226
}
2327
const pm = await detectPackageManager(rootDir);

packages/bumpy/src/commands/ci.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ function pushWithToken(rootDir: string, branch: string): void {
209209
log.dim(' Pushed with custom token — PR workflows will be triggered');
210210
} else {
211211
runArgs(['git', 'push', '-u', 'origin', branch, '--force'], { cwd: rootDir });
212-
if (!token) {
212+
if (!token && repo) {
213+
// Only warn on GitHub Actions — other CI providers don't have this limitation
213214
log.warn(
214215
'BUMPY_GH_TOKEN is not set — PR checks will not trigger automatically.\n' +
215216
' Run `bumpy ci setup` for help, or see https://bumpy.dev/docs/ci#pr-checks',

0 commit comments

Comments
 (0)