Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Conversation

@pllim
Copy link
Member

@pllim pllim commented Sep 28, 2017

Fix #34 by limiting get_issues() to really only get issues, not PRs. Since PR handler has its own methods to get open PRs, this should not break anything?

>>> changebot.github.github_api import RepoHandler
>>> repo = RepoHandler('astropy/astropy')
>>> repo.get_issues('open', 'Close?')  # No 3845
[6025, 5193, 4842, 4549, 3951, 2603, 2232, 435, 383, 282]
>>> repo.get_issues('open', 'Close?', exclude_pr=False)  # Has 3845
[6025, 5193, 4842, 4549, 3951, 3845, 2603, 2232, 1920, 435, 383, 282]

Also added a test for this as per #33.

p.s. I briefly thought about having get_issues() to return a list of handlers instead of just numbers, but that has larger overhead, so will need a good reason to do so.

@pllim pllim added the bug label Sep 28, 2017
@pllim pllim requested review from astrofrog and bsipocz September 28, 2017 02:53
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 67.172% when pulling 5e57d89 on pllim:get_issue_no_pr into 2e32dcc on astropy:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.3%) to 68.75% when pulling 2674b46 on pllim:get_issue_no_pr into 2e32dcc on astropy:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.6%) to 70.053% when pulling ce38ee5 on pllim:get_issue_no_pr into 2e32dcc on astropy:master.

Copy link
Member

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@astrofrog astrofrog merged commit f7578e9 into astropy:master Sep 28, 2017
@pllim pllim deleted the get_issue_no_pr branch September 28, 2017 14:07
astrofrog added a commit to OpenAstronomy/baldrick that referenced this pull request Jul 19, 2018
get_issues() to only return issues, not PRs
astrofrog added a commit to OpenAstronomy/baldrick that referenced this pull request Jul 19, 2018
get_issues() to only return issues, not PRs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants