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

Automatically add upstream during PR creation #2439

Closed
burkeholland opened this issue Jan 29, 2021 · 3 comments · Fixed by #2560
Closed

Automatically add upstream during PR creation #2439

burkeholland opened this issue Jan 29, 2021 · 3 comments · Fixed by #2560
Assignees
Labels
feature-request Request for new features or functionality ghcs-scenario-found verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@burkeholland
Copy link
Collaborator

burkeholland commented Jan 29, 2021

When creating a new PR, we should automatically create an upstream for the user if they do not already have one defined. Proposed workflow....

  1. User creates new PR
  2. Extension prompts them for origin or "parent"
  3. User selects "parent"
  4. Extension prompts with: "Submitting a PR requires that the parent repo be added as an "upstream" remote. Would you like to add it as the upstream now?" (Yes / Cancel - kills the whole workflow)
  5. User selects "Yes"
  6. Parent is added as upstream
  7. PR is created

Linking https://github.com/microsoft/vssaas-planning/issues/2176

@burkeholland
Copy link
Collaborator Author

Come to think of it, we don't need to ask them - we can just do it. They've said they want to create a PR, you have to have an upstream to do that, congratulations on your new upstream.

@bamurtaugh
Copy link
Member

Hey @RMacfarlane, just to clarify - how does this feature look in action?

When I create a PR on https://github.com/chrisdias/gh-static-e2e, which is a fork of https://github.com/fiveisprime/gh-static-e2e, should fiveisprime/gh-static-e2e automatically be added as an upstream and listed as an option in the dropdowns (that's what I anticipated, but I'm only seeing chrisdias/gh-static-e2e, so perhaps this is different than my understanding):

image

image

v2021.3.22143 of GHPRI Nightly

Version: 1.55.0-insider
Commit: 892a1083cb2b9b3987ff7edc85376b5d9764433d
Date: 2021-03-16T05:11:52.701Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36

@RMacfarlane RMacfarlane added the verification-needed Verification of issue is requested label Mar 22, 2021
@RMacfarlane
Copy link
Contributor

Yeah, that's correct, there should be an upstream added in this case. Talked offline, Brigit has been able to verify last week, was seeing weird behavior before where the stable version of the extension seemed to still be active.

To verify:

  • Use nightly version of the extension
  • Fork a repo
  • Open the fork in VS Code
  • After the extension initializes, there should be both an origin and upstream when running git remote -v

@lramos15 lramos15 added the verified Verification succeeded label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality ghcs-scenario-found verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants