Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
WIP: PR checkout button. #473
Conversation
When clicked checks out the PR into a new branch.
Conflicts: src/GitHub.App/Services/PullRequestService.cs src/GitHub.Exports.Reactive/Services/IPullRequestService.cs
- Moved git things into GitClient - Create a name based on PR number and title - Added GitClient method to find remote tracking branch with basic tests Still need to correctly set the remote tracking status of the checked out branch.
Conflicts: src/GitHub.App/Services/GitClient.cs src/GitHub.App/Services/PullRequestService.cs src/GitHub.App/ViewModels/PullRequestListViewModel.cs src/GitHub.Exports.Reactive/Services/IPullRequestService.cs src/UnitTests/GitHub.App/ViewModels/PullRequestListViewModelTests.cs
- Just just textual matching to find a local PR branch - Now handles merging changes into existing PR branch.
| @@ -131,6 +134,8 @@ public bool HasNewComments | ||
| public DateTimeOffset CreatedAt { get; set; } | ||
| public DateTimeOffset UpdatedAt { get; set; } | ||
| public IAccount Author { get; set; } | ||
| [AllowNull] public GitReference Base { [return: AllowNull] get; set; } | ||
| [AllowNull] public GitReference Head { [return: AllowNull] get; set; } |
shana
Sep 13, 2016
Collaborator
We already have a IBranch somewhere which should probably be representing this information. It'll likely need some tweaking, but it already includes the owner repository, so it can give you access to the clone url.
We already have a IBranch somewhere which should probably be representing this information. It'll likely need some tweaking, but it already includes the owner repository, so it can give you access to the clone url.
|
|
||
| if (existing != null) | ||
| { | ||
| return new NewOrExistingBranch(existing); |
shana
Sep 13, 2016
Collaborator
BranchModel is probably what you want to use here.
BranchModel is probably what you want to use here.
As LibGit2Sharp doesn't allow us to add multiple fetch refs for a single remote.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Adds a PR checkout button that when clicked, checks out the PR to a new branch