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

Implement PR checkout #497

Merged
merged 7 commits into from
Mar 27, 2019
Merged

Implement PR checkout #497

merged 7 commits into from
Mar 27, 2019

Conversation

gauravsaralMs
Copy link
Contributor

@gauravsaralMs gauravsaralMs commented Mar 25, 2019

Please make sure the code is following contribution guidelines in CONTRIBUTING.md

  • : This PR has a corresponding issue open in the Repository.
  • : Approach is signed off on the issue.

#249

:param id: ID of the pull request.
:type id: int
"""
organization = resolve_instance(detect='on', organization=None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve_instance will throw first. User will see "--organization must be specified..." instead of your error if they try from outside a git repo context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

azure-devops/azext_devops/dev/repos/pull_request.py Outdated Show resolved Hide resolved
azure-devops/azext_devops/dev/repos/pull_request.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@atbagga atbagga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write tests.

git_info = get_vsts_info_from_current_remote_url()
organization = git_info.uri
if not organization:
raise CLIError('this command should be used from a valid git repository only')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This

Rewording? not just any valid git repository it should be Azure Repo only.

@gauravsaralMs gauravsaralMs merged commit a4cc17a into Azure:master Mar 27, 2019
@gauravsaralMs gauravsaralMs deleted the users/gsaral/prCheckout branch March 27, 2019 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants