Repository navigation
Description
Currently, there are two ways to checkout a PR:
- From the "Pull Requests" list tab that appears on the GitHub Desktop app.
- From github.com when navigating to a Pull Request page.
Each of these entry points has its own logic, which causes a few inconsistencies/bugs mostly on the checkout from dotcom flow.
Unifying this logic will make it much easier to fix bugs and keep the behaviour more consistent between the two flows.
(note that these bugs can be reproduced in current production).
1. PR branches created in dotcom don't get associated to the PR
How to reproduce:
- Clone a repository that has PRs (e.g
desktop/desktop) from Desktop. - Open a the dotcom page of a PR that was created from a fork (e.g
https://github.com/desktop/desktop/pull/9430). - Click on the
open this in GitHub Desktoplink.
Expected behaviour: The PR branch gets checked out and it gets linked to the PR in the desktop UI:
Actual behaviour: The PR branch does not get linked to the PR:
2. Cannot checkout some PRs from dotcom
There's a quite rare situation that can cause an error popping out when trying to checkout some specific PRs from dotcom (@tierninho ran into it in #9340 (comment)).
Steps to reproduce:
- Clone
kuychaco/urban-potatofrom Desktop. - Open
https://github.com/not-kuychaco/urban-potato/pull/3and click on theopen this in GitHub Desktoplink.
Expected behaviour: The PR branch gets checked out.
Actual behaviour: The following error appears:
3. Wrong name of PR branches created from Desktop
When checking out a PR created on an upstream repository from Desktop, in some situations (when the PR was created from a branch in the upstream repository) the local branch will have an incorrect name and the upstream remote will get duplicated.
(this issue is only reproducible with the changes in #9340, since before that the upstream PRs were not shown).
Steps to reproduce:
- Clone
kuychaco/urban-potatofrom Desktop. - Go to the list of PRs inside Desktop and click on the "Update readme.md" PR (PR number 3).
Expected behaviour: A local branch called kuychaco-patch-1 is created tracking upstream/kuychaco-patch-1 (the branch of the PR).
Actual behaviour: A new remote github-desktop-not-kuychaco is added to the repo with the same value as the upstream remote and a local branch called pr/3 is created tracking github-desktop-not-kuychaco/kuychaco-patch-1.
(this is not a big issue, but it's inconsistent with what happens when checking out the same PR from dotcom, see #9340 (comment)).



Activity