microsoft / microsoft/vscode-pull-request-github

Request for `>GitHub Pull Requests: Forget Pull Request`

Aperta
#8,639 1 commento 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
2.6k
Fork
795
Merge medio
1g 4h
PR unite (30g)
46

Descrizione

When I create a pull request, my workflow is typically:

  • Create a branch, feature/foo
  • Do work
  • Create a pull request associated with feature/foo
  • Get a review from a colleague
  • Look at the review on GitHub
  • Merge the pull request from GitHub

This leaves my local state in an awkward scenario. I need to:

  • Switch to main
  • Pull main
  • Delete my feature/foo branch

I can do this manually, but this is such a common workflow of mine that I feel like a command for this is somehow missing. In R, we've created a suite of PR related helpers for this and the relevant one is usethis::pr_finish(), which does these exact steps.

The closest I can seem to get is:

  • >GitHub Pull Requests: Checkout Default Branch
  • With "githubPullRequests.postDone": "checkoutDefaultBranchAndPull"

(I'm not even 100% sure that a pull occurs when you use the command, but I think it does)

This accomplishes the first 2 bullets, but not the 3rd, so I have to go delete feature/foo myself.

I think I am missing something like

>GitHub Pull Requests: Forget Pull Request

Which has the purpose of:

  • Checkout the default branch (subject to githubPullRequests.postDone so I can make it also pull)
  • Delete the current branch you switched from

I would use this all the time if it existed as a way to cleanup after a merge via the GitHub UI.


I am aware of "githubPullRequests.deleteBranchAfterMerge": true. I do not believe that solves my problem because I almost exclusively merge via the GitHub UI, and it only works if I merge via the Extension UI.


It's also worth noting that if I checkout someone else's PR to perform a review, then it mostly works as I expect.

  • Checkout colleague PR feature/bar using the GitHub Pull Request extension
  • Leave my review
  • Click Checkout Default Branch (with "githubPullRequests.postDone": "checkoutDefaultBranchAndPull" set)
  • This auto deletes feature/bar for me

This workflow is quite nice! I want something similar for finishing off my own PRs.

Here is a video of me doing that workflow, which I do like:

https://github.com/user-attachments/assets/ff6a07e6-7ae5-4d8b-a447-91d51c96b597

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando il comando esistente Checkout Default Branch e le impostazioni githubPullRequests.postDone e githubPullRequests.deleteBranchAfterMerge. La funzionalità è completa quando una pull request unita può tornare al branch predefinito, applicare il comportamento di pull configurato ed eliminare il branch precedentemente estratto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, github, typescript
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
58/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.