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
Closed
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Adds a PR checkout button that when clicked, checks out the PR to a new branch