microsoft / microsoft/vscode-pull-request-github

Support using `pushRemote` and `merge` to detect the PR of a branch

Offen
#7,944 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature-request
Vorherrschende Sprache
TypeScript
Sterne
2.6k
Forks
796
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
46

Beschreibung

My branches are set up like this (a triangle workflow, but with just one remote):

[branch "feature1"]
	pushRemote = origin
	remote = origin
	merge = refs/heads/master
[branch "feature2-using-feature1"]
	pushRemote = origin
	remote = origin
	merge = refs/heads/feature1

Currently it seems like this plugin is matching the "merge" setting of the branches against the "from" setting of the PR to decide which branch should be checked-out for a PR. However this results in feature2-using-feature1 being associated with feature1's PR.

I couldn't find a setting to make this work. I'm working around it by going into .git/config and manually updating the vscode-merge-base and github-pr-owner-number settings for each branch, but it would be great if there's some way to configure this plugin so that PRs can be associated with branches based on the pushRemote setting and matching names of the local branches with those on the pushRemote (https://git-scm.com/docs/git-config#Documentation/git-config.txt-branchnamepushRemote)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es werden keine Dateien oder Tests genannt. Beginne damit, die Logik für die Zuordnung von Branches zu PRs zu finden, und verfolge, wie Branch-Merge-Einstellungen dem From-Branch eines PRs zugeordnet werden. Vergleiche dieses Verhalten mit Git's pushRemote und lokalen Branch-Namen; die Aufgabe ist erledigt, wenn der Triangle-Workflow jeden PR ohne manuelle Änderungen an .git/config dem vorgesehenen lokalen Branch zuordnet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, github, typescript, vscode
Bereich
developer-experience, devtools, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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