microsoft / microsoft/vscode-pull-request-github
Don't fetch every branch in contributor's remote when checking out a pull request
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 796
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 46
説明
Thanks for this very nice extension!! It is really nice to review code in my code editor:)
I noticed that when I clicked the blue "Checkout" button in the pull request tab, the following happens:
- The extension adds a remote named after the GitHub username of the pull-request author (this remote is not deleted when I "Exit review mode")
- This new remote is fetched (this creates remote-tracking branches for all branches in the contributor's remote)
- The the source branch of the pull request is checked out (this branch is not deleted when I "Exit review mode")
I don't like 2), it pollutes the output of git branch -r.
I think the extension should only fetch the branch of the pull request, i.e.
git fetch $PR_AUTHOR_REMOTE_URL $PR_BRANCH:refs/heads/pr/$AUTHOR_GITHUB_USERNAME/$PR_NUMBER
In fact, adding a remote is not even necessary as Git can fetch a branch directly into FETCH_HEAD, and we can the checkout FETCH_HEADin detached HEAD.
I understand the current behaviour might be convenient for some, but maybe it could be configurable ?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
プルリクエストタブの Checkout フローから始めて、contributor remote の追加、それの fetch、source branch の checkout がどのように行われるかを追跡します。その動作を、issue で提案されている branch-only fetch および detached checkout と比較し、review モードの checkout に関する既存のテストを特定します。完了の条件は、関係のない contributor branch が git branch -r に表示されなくなり、クリーンアップも引き続き機能することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, typescript
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100