github / github/app

New-session branch picker only enumerates the 'origin' remote; repos with other remote names show only the default branch

Offen
#1,392 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Bugs
Vorherrschende Sprache
Keine Sprachdaten
Sterne
2.1k
Forks
153
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Summary

When creating a new session for a multi-repo collection project, the branch picker only enumerates branches for repos whose remote is named `origin`. Repos that use a differently-named remote (e.g. `github`) fall back to showing only the default branch (`main`), and their `repo_full_name` is reported as `unknown`.

### Repro

Collection project with two member repos:

- `frontend` — remote named `origin` -> all branches are listed in the new-session branch picker.
- `backend` — remote named `github` (same GitHub URL, just a different remote name) -> only `main` is selectable, and the repo shows up as `repo_full_name: unknown`.

Both remotes point at valid GitHub repos:

```
origin https://github.com/Org/frontend.git
github https://github.com/Org/backend.git
```

### Expected

Branch enumeration and repo resolution should work regardless of the remote name. The app should inspect all configured remotes (or at least the one backing the tracked/default branch) rather than hard-coding a lookup for `origin`.

### Actual

Only the `origin` remote is consulted. Repos without an `origin` remote are limited to the default branch and are labeled `unknown`.

### Workaround

Add or rename the remote to `origin`:

```
git remote rename github origin
```

After this, the new-session branch picker lists all branches for that repo.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start at the new-session branch picker and trace how it discovers remotes and resolves repo_full_name. Reproduce with a repository whose remote is named github, then verify that all branches are listed and the repository is no longer shown as unknown without renaming the remote.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, github
Bereich
desktop
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.