Skip to content

Don't default the base repo for pull requests to "origin"#5508

Merged
stefanhaller merged 1 commit intomasterfrom
dont-default-base-repo-to-origin
Apr 13, 2026
Merged

Don't default the base repo for pull requests to "origin"#5508
stefanhaller merged 1 commit intomasterfrom
dont-default-base-repo-to-origin

Conversation

@stefanhaller
Copy link
Copy Markdown
Collaborator

When no base repository is configured using gh, we have several heuristics for choosing a likely base repo before prompting the user. One of these was that if the origin remote exists, we'd choose that. This may be the right choice in some cases, but in many others it's not; for example, in the common scenario of a forking setup where the upstream repo's remote is called after its owner, and the fork remote is called origin, we would choose origin as the base repo, which results in not showing any PRs. Don't do that, and instead prompt the user for the base repo in this case.

When no base repository is configured using gh, we have several heuristics for
choosing a likely base repo before prompting the user. One of these was that if
the origin remote exists, we'd choose that. This may be the right choice in some
cases, but in many others it's not; for example, in the common scenario of a
forking setup where the upstream repo's remote is called after its owner, and
the fork remote is called origin, we would choose origin as the base repo, which
results in not showing any PRs. Don't do that, and instead prompt the user for
the base repo in this case.
@stefanhaller stefanhaller added the bug Something isn't working label Apr 13, 2026
@stefanhaller stefanhaller enabled auto-merge April 13, 2026 20:02
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 13, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage 0.00% diff coverage

Metric Results
Coverage variation Report missing for 9cd5fb81
Diff coverage 0.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9cd5fb8) Report Missing Report Missing Report Missing
Head commit (4218f97) 61937 53901 87.03%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5508) 2 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

TIP This summary will be updated as you push new changes. Give us feedback

@stefanhaller stefanhaller merged commit d167063 into master Apr 13, 2026
14 checks passed
@stefanhaller stefanhaller deleted the dont-default-base-repo-to-origin branch April 13, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant