I want to find a project on Gitlab using the sshUrlToRepo
or httpUrlToRepo
field as a filter.
I'm trying to use the GraphQL API to do this, but am not having much success. My query, so far, looks like this:
query {
projects(search: "url_sub_str") {
nodes {
id
sshUrlToRepo
httpUrlToRepo
}
}
}
This seems to filter based on url_sub_str
but it's not an exact match. Is there a way to query a Gitlab project using a git remote URL of either the ssh or http variety?
Note, I'm not wedded to a GraphQL approach, a regular REST call would also do. But, ideally, I don't want to have to query a load of projects and do the search client-side. Thanks.