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

Launchpad: API search for PRs on GitLab #3788

Open
sergeibbb opened this issue Nov 21, 2024 · 2 comments
Open

Launchpad: API search for PRs on GitLab #3788

sergeibbb opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@sergeibbb
Copy link
Member

This issue is a follow-up of #3543


  • Search for PRs on GitLab
@sergeibbb sergeibbb self-assigned this Nov 21, 2024
@sergeibbb sergeibbb added this to the Shortlist milestone Nov 21, 2024
@sergeibbb sergeibbb added the feature New feature or request label Nov 21, 2024
@sergeibbb
Copy link
Member Author

sergeibbb commented Nov 22, 2024

Hi @axosoft-ramint , @eamodio

I have a following question. It looks like GitLab's GraphQL is not able to search for PRs in general. It can does the following:

  • get for a user: one of the following
    • assignedMergeRequests
    • authoredMergeRequests
    • reviewRequestedMergeRequests
  • get for a project/group

Now for the Launchpad "get for a user" set of requests is used but retrieving only open ones: state:opened

Also there is a REST API endpoint that just searches everywhere, e.g.: https://gitlab.com/api/v4/search?scope=merge_requests&search=flight

What I can do:

  1. use "get by user" requests withtout state:opened limitations. By doing that I loose PRs that are not associated with the current user.
  2. use "get by project" request for currently opened repositories. By doing that I loose PRs that belong to other projects.
  3. use REST API endpoint. The results can be too wide, but now we have same for GitHub.

For now I'm going to continue with # 3 until we choose another option or find a better solution.

Also, maybe I just wrong about GraphQL possibilities and it can search, and I just haven't found how to do that.

What do you think?

@axosoft-ramint
Copy link
Contributor

I feel like since what we're doing with GitHub on a search is "search everywhere", we should have equivalent behavior for GitLab. So 3 sounds right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants