-
Notifications
You must be signed in to change notification settings - Fork 246
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
Implement PR checkout #497
Conversation
:param id: ID of the pull request. | ||
:type id: int | ||
""" | ||
organization = resolve_instance(detect='on', organization=None) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
There was a problem hiding this 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') |
There was a problem hiding this comment.
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.
Please make sure the code is following contribution guidelines in CONTRIBUTING.md
#249