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

GHRepository.getIssues(GHIssueState.CLOSED) also return pull requests #134

Closed
phong1990 opened this issue Oct 16, 2014 · 1 comment
Closed

Comments

@phong1990
Copy link

Hi kohsuke,

I was using your api, it was great but there is this bug I hope you can fix it soon:
Whenever I call the function GHRepository.getIssues(GHIssueState.CLOSED), it returns a list of both issues and pull requests.

I expect only issue though. Currently my work around is to call getPullRequests then for each issue from getIssues, I search in the whole list of pull requests to see if it is already there. Then I ignore it. But this makes my algorithm runs at O(n*m).

Please fix it soon.

kohsuke added a commit that referenced this issue Feb 15, 2015
@kohsuke
Copy link
Collaborator

kohsuke commented Feb 15, 2015

I don't think I'll change the current behavior as that is what the API returns.

If you want to filter out PRs, you can use GHIssue.getPullRequest to do that check in O(1). No O(n*m) computation necessary.

@kohsuke kohsuke closed this as completed Feb 15, 2015
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

No branches or pull requests

2 participants