Skip to content

fix: use commit as the default git action without origin#642

Merged
juliusmarminge merged 4 commits intopingdotgg:mainfrom
binbandit:fix/git-action-default-without-origin
Mar 10, 2026
Merged

fix: use commit as the default git action without origin#642
juliusmarminge merged 4 commits intopingdotgg:mainfrom
binbandit:fix/git-action-default-without-origin

Conversation

@binbandit
Copy link
Contributor

@binbandit binbandit commented Mar 9, 2026

Summary

  • track whether the repository has an origin remote in git branch metadata
  • fall back to Commit for the primary git action when a branch has no upstream and no origin remote
  • disable push/PR affordances that cannot succeed without origin, and cover the new behavior with UI and git-layer tests

Validation

  • bun lint
  • bun typecheck

Note

Use commit as the default git action when no origin remote is configured

  • Adds hasOriginRemote to GitListBranchesResult (contract, server, and client) to indicate whether a remote named origin is configured.
  • resolveQuickAction falls back to a Commit action (instead of Push) when there are local changes but no upstream and no origin remote.
  • buildMenuItems disables Push and Create PR when there is no upstream and no origin remote, showing a tooltip hint to add an origin remote.
  • Behavioral Change: repos without an origin remote now default to commit-only flows; push and PR actions are disabled until origin is added.

Macroscope summarized 1f1e1e4.

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9a7ee824-96e8-4656-9c2d-cae7286293c5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 9, 2026
@maria-rcks maria-rcks added enhancement New feature or request needs-julius labels Mar 9, 2026
@binbandit
Copy link
Contributor Author

@juliusmarminge good to go now

@juliusmarminge juliusmarminge force-pushed the fix/git-action-default-without-origin branch from 5965cd2 to d550044 Compare March 10, 2026 16:39
@juliusmarminge juliusmarminge merged commit 1c29076 into pingdotgg:main Mar 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-julius vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants