Skip to content

Instantly share code, notes, and snippets.

@nakatanakatana
Created August 23, 2021 17:25
Show Gist options
  • Save nakatanakatana/d5580e4275f19831590bf331e96d5619 to your computer and use it in GitHub Desktop.
Save nakatanakatana/d5580e4275f19831590bf331e96d5619 to your computer and use it in GitHub Desktop.
query GitLabIssue($projectPath: ID!) {
project(fullPath: $projectPath) {
name
issueCount: issueStatusCounts(types: ISSUE) {
all
closed
opened
}
issueToDoCount: issueStatusCounts(labelName: ["status::ToDo"]) {
all
closed
opened
}
issueDoingCount: issueStatusCounts(labelName: ["status::Doing"]) {
all
closed
opened
}
issueMRCount: issueStatusCounts(labelName: ["status::MR"]) {
all
closed
opened
}
issueDoneCount: issueStatusCounts(labelName: ["status::Done"]) {
all
closed
opened
}
openIssuesCount
issues {
count
}
mergeRequests {
count
}
}
}
metrics:
- name: issue_count_all
path: "{ .project.issueCount.all }"
labels:
project: "{ .project.name }"
- name: issue_count_closed
path: "{ .project.issueCount.closed }"
labels:
project: "{ .project.name }"
- name: issue_count_opened
path: "{ .project.issueCount.opened }"
labels:
project: "{ .project.name }"
- name: issue_todo_count_all
path: "{ .project.issueToDoCount.all }"
labels:
project: "{ .project.name }"
- name: issue_todo_count_closed
path: "{ .project.issueToDoCount.closed }"
labels:
project: "{ .project.name }"
- name: issue_todo_count_opened
path: "{ .project.issueToDoCount.opened }"
labels:
project: "{ .project.name }"
- name: issue_doing_count_all
path: "{ .project.issueDoingCount.all }"
labels:
project: "{ .project.name }"
- name: issue_doing_count_closed
path: "{ .project.issueDoingCount.closed }"
labels:
project: "{ .project.name }"
- name: issue_doing_count_opened
path: "{ .project.issueDoingCount.opened }"
labels:
project: "{ .project.name }"
- name: issue_mr_count_all
path: "{ .project.issueMRCount.all }"
labels:
project: "{ .project.name }"
- name: issue_mr_count_closed
path: "{ .project.issueMRCount.closed }"
labels:
project: "{ .project.name }"
- name: issue_mr_count_opened
path: "{ .project.issueMRCount.opened }"
labels:
project: "{ .project.name }"
- name: issue_done_count_all
path: "{ .project.issueDoneCount.all }"
labels:
project: "{ .project.name }"
- name: issue_done_count_closed
path: "{ .project.issueDoneCount.closed }"
labels:
project: "{ .project.name }"
- name: issue_done_count_opened
path: "{ .project.issueDoneCount.opened }"
labels:
project: "{ .project.name }"
- name: merge_requests
path: "{ .project.mergeRequests.count }"
labels:
project: "{ .project.name }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment