Skip to content

Conversation

@migueldiascosta
Copy link
Member

No description provided.

'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'),
Copy link
Member

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?

"""
List PRs
:param parameters: https://developer.github.com/v3/pulls/#parameters
Copy link
Member

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

@boegel boegel added this to the next release (3.5.2 or 3.6.0) milestone Feb 13, 2018
@boegel
Copy link
Member

boegel commented Feb 13, 2018

@migueldiascosta Can you look into adding a test too?

@migueldiascosta
Copy link
Member Author

@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...

@migueldiascosta
Copy link
Member Author

ah, the tests use hpcugent/testrepository, ok.

I'll submit and close a PR to it so it can be tested.

@boegel boegel modified the milestones: 3.5.2, 3.6.0 Feb 22, 2018
@easybuilders easybuilders deleted a comment from boegelbot Mar 14, 2018
@easybuilders easybuilders deleted a comment from boegelbot Mar 14, 2018
@boegel boegel modified the milestones: 3.6.0, 3.x Mar 15, 2018
expected = "PR #1: a pr"

try:
output = gh.list_prs(parameters)
Copy link
Member

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?

@migueldiascosta migueldiascosta changed the title initial support for --list-prs (WIP) initial support for --list-prs Apr 4, 2018
@migueldiascosta migueldiascosta changed the title initial support for --list-prs initial support for --list-prs (REVIEW) Apr 20, 2018
@boegel boegel modified the milestones: 3.x, 3.8.0 Nov 19, 2018
@boegel boegel changed the title initial support for --list-prs (REVIEW) add support for --list-prs (REVIEW) Nov 19, 2018
use constants for open/created/desc + mention incorrect value in error message for --list-prs
ensure ordered output in message printed by --list-prs, drop unused GITHUB_MAX_PER_PAGE from _postprocess_list_prs
@boegel
Copy link
Member

boegel commented Nov 22, 2018

Thanks @migueldiascosta!

@boegel boegel merged commit 638bcf7 into easybuilders:develop Nov 22, 2018
@migueldiascosta migueldiascosta changed the title add support for --list-prs (REVIEW) add support for --list-prs Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants