-
Notifications
You must be signed in to change notification settings - Fork 217
add support for --list-prs #2400
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
Conversation
easybuild/tools/options.py
Outdated
| 'list-prs': ("List pull requests", None, 'store_true', None), | ||
| 'list-prs-state': ("List pull requests in state open/closed", str, 'store', 'open'), | ||
| 'list-prs-sort': ("Sort pull requests by created/updated/popularity", str, 'store', 'created'), | ||
| 'list-prs-direction': ("Sorting pull requests in asc/desc order", str, 'store', 'desc'), |
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.
Also choice option? Maybe list-prs-order is better?
easybuild/tools/github.py
Outdated
| """ | ||
| List PRs | ||
| :param parameters: https://developer.github.com/v3/pulls/#parameters |
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.
Selection parameters for PRs, see https://developer.github.com/v3/pulls/#parameters
|
@migueldiascosta Can you look into adding a test too? |
|
@boegel using the actual PRs as expected output? Hm, I suppose the output of list_prs({'direction': 'asc', 'sort': 'created', 'state': 'closed'})should be constant... |
|
ah, the tests use I'll submit and close a PR to it so it can be tested. |
test/framework/github.py
Outdated
| expected = "PR #1: a pr" | ||
|
|
||
| try: | ||
| output = gh.list_prs(parameters) |
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.
Given all the parsing magic we have, I would test --list-prs directly via a test in test/framework/options.py?
…r message for --list-prs
use constants for open/created/desc + mention incorrect value in error message for --list-prs
appease the Hound
…ITHUB_MAX_PER_PAGE from _postprocess_list_prs
ensure ordered output in message printed by --list-prs, drop unused GITHUB_MAX_PER_PAGE from _postprocess_list_prs
|
Thanks @migueldiascosta! |
No description provided.