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

Add GHIssueQueryBuilder to allow better filtering of issue queries #1025

Closed
blacelle opened this issue Jan 26, 2021 · 1 comment · Fixed by #1239
Closed

Add GHIssueQueryBuilder to allow better filtering of issue queries #1025

blacelle opened this issue Jan 26, 2021 · 1 comment · Fixed by #1239

Comments

@blacelle
Copy link
Contributor

Describe the feature
GitHub API enables multiple search criteria: https://docs.github.com/en/rest/reference/issues#list-repository-issues (e.g. assignee, creator, labels).

How, I can't see how one can take advantage of these parameters through the library API?

Additional context
I might have crafted manually a call similar to

    /**
     * Lists up all the issues in this repository.
     *
     * @param state
     *            the state
     * @return the paged iterable
     */
    public PagedIterable<GHIssue> listIssues(final GHIssueState state) {
        return root.createRequest()
                .with("state", state)
                .withUrlPath(getApiTailUrl("issues"))
                .toIterable(GHIssue[].class, item -> item.wrap(this));
    }

but it seems not trivial to get a reference to the root variable inside GHRepository.

Thanks

@bitwiseman
Copy link
Member

You're right. We have a GHPullRequestQueryBuilder but not a GHIssueQueryBuilder. You could use the GHPullRequestQueryBuilder as a template or even move to having a GHIssueQueryBuilder as a base class for GHPullRequestQueryBuilder.

@bitwiseman bitwiseman changed the title Finer listing of existing issues Add GHIssueQueryBuilder to allow better filtering of issue queries Jun 28, 2021
@bloslo bloslo mentioned this issue Sep 24, 2021
bloslo added a commit to bloslo/github-api that referenced this issue Sep 24, 2021
bitwiseman added a commit to bloslo/github-api that referenced this issue Sep 26, 2021
bloslo added a commit to bloslo/github-api that referenced this issue Sep 28, 2021
bloslo added a commit to bloslo/github-api that referenced this issue Sep 28, 2021
bitwiseman added a commit that referenced this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants