The Wayback Machine - https://web.archive.org/web/20201215055023/https://github.com/github/VisualStudio/pull/473
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: PR checkout button. #473

Closed
wants to merge 13 commits into from
Closed

WIP: PR checkout button. #473

wants to merge 13 commits into from

Conversation

@grokys
Copy link
Contributor

@grokys grokys commented Aug 5, 2016

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

grokys added 12 commits Aug 5, 2016
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; }

This comment has been minimized.

@shana

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.


if (existing != null)
{
return new NewOrExistingBranch(existing);

This comment has been minimized.

@shana

shana Sep 13, 2016
Collaborator

BranchModel is probably what you want to use here.

As LibGit2Sharp doesn't allow us to add multiple fetch refs for a single
remote.
@grokys grokys closed this Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.