Open maciekbanas opened 1 year ago
It seems there is no sensible way to pull all commits via GraphQL in GitLab. Only solution is pulling commits from 'mergeRequests' field.
Maybe looking through merge requests isn't that bad. It could look like this:
query GetCommitsFromRepo($project_path: ID!, $merge_request: String!) {
project(fullPath: $project_path) {
name
id
webUrl
mergeRequest(iid: $merge_request) {
title
commitCount
commits(first: 100) {
pageInfo {
endCursor
startCursor
}
nodes {
id
title
}
}
}
}
}
Tried approach with merge requests. The problem is the need to iterate over multiple merge requests, which does not make it really faster than REST as there are multiple requests to API. It is probably even slower.
A question is it possible