3
3
(* Queries *)
4
4
5
5
module PullRequest_Cards =
6
- [% graphql
7
- {|
6
+ [% graphql
7
+ {|
8
8
query prCards($ owner: String!, $repo: String!, $number: Int! ) {
9
9
repository(owner: $owner,name: $repo ) {
10
10
pullRequest(number: $number ) {
@@ -22,8 +22,8 @@ module PullRequest_Cards =
22
22
| }]
23
23
24
24
module PullRequest_ID =
25
- [% graphql
26
- {|
25
+ [% graphql
26
+ {|
27
27
query prID($ owner: String!, $repo: String!, $number: Int! ) {
28
28
repository(owner: $owner,name: $repo ) {
29
29
pullRequest(number: $number ) {
@@ -34,8 +34,8 @@ module PullRequest_ID =
34
34
| }]
35
35
36
36
module PullRequest_Milestone =
37
- [% graphql
38
- {|
37
+ [% graphql
38
+ {|
39
39
query prInfo($ pr_id: ID! ) {
40
40
node(id: $pr_id ) {
41
41
... on PullRequest {
@@ -49,8 +49,8 @@ module PullRequest_Milestone =
49
49
| }]
50
50
51
51
module PullRequest_ID_and_Milestone =
52
- [% graphql
53
- {|
52
+ [% graphql
53
+ {|
54
54
query prInfo($ owner: String!, $repo: String!, $number: Int! ) {
55
55
repository(owner: $owner,name: $repo ) {
56
56
pullRequest(number: $number ) {
@@ -65,8 +65,8 @@ module PullRequest_ID_and_Milestone =
65
65
| }]
66
66
67
67
module Milestone_ID =
68
- [% graphql
69
- {|
68
+ [% graphql
69
+ {|
70
70
query milestoneID($ owner: String!, $repo: String!, $number: Int! ) {
71
71
repository(owner: $owner,name: $repo ) {
72
72
milestone(number: $number ) {
@@ -77,8 +77,8 @@ module Milestone_ID =
77
77
| }]
78
78
79
79
module TeamMembership =
80
- [% graphql
81
- {|
80
+ [% graphql
81
+ {|
82
82
query teamMember($ org: String!, $team: String!, $user: String! ) {
83
83
organization(login:$org ) {
84
84
team(slug:$team ) {
@@ -99,8 +99,8 @@ module ParseAsString = struct
99
99
end
100
100
101
101
module PullRequest_Refs =
102
- [% graphql
103
- {|
102
+ [% graphql
103
+ {|
104
104
query prRefs($ owner: String!, $repo: String!, $number: Int! ) {
105
105
repository(owner: $owner, name:$repo ) {
106
106
pullRequest(number: $number ) {
@@ -129,8 +129,8 @@ module PullRequest_Refs =
129
129
| }]
130
130
131
131
module Issue_Milestone =
132
- [% graphql
133
- {|
132
+ [% graphql
133
+ {|
134
134
fragment Milestone on Milestone {
135
135
id
136
136
}
@@ -165,8 +165,8 @@ module Issue_Milestone =
165
165
| }]
166
166
167
167
module PullRequestReviewsInfo =
168
- [% graphql
169
- {|
168
+ [% graphql
169
+ {|
170
170
fragment Reviews on PullRequestReviewConnection {
171
171
nodes {
172
172
author { login }
@@ -203,8 +203,8 @@ module PullRequestReviewsInfo =
203
203
| }]
204
204
205
205
module DefaultBranch =
206
- [% graphql
207
- {|
206
+ [% graphql
207
+ {|
208
208
query defaultBranch($ owner: String!, $repo: String! ) {
209
209
repository(owner: $owner, name: $repo ) {
210
210
defaultBranchRef {
@@ -215,8 +215,8 @@ module DefaultBranch =
215
215
| }]
216
216
217
217
module FileContent =
218
- [% graphql
219
- {|
218
+ [% graphql
219
+ {|
220
220
query fileContent($ owner: String!, $repo: String!, $file: String! ) {
221
221
repository(owner: $owner, name: $repo ) {
222
222
file :object (expression : $ file) {
@@ -229,8 +229,8 @@ module FileContent =
229
229
| }]
230
230
231
231
module RepoId =
232
- [% graphql
233
- {|
232
+ [% graphql
233
+ {|
234
234
query repoId($ owner: String!, $repo: String! ) {
235
235
repository(owner: $owner, name: $repo ) {
236
236
id
@@ -239,8 +239,8 @@ module RepoId =
239
239
| }]
240
240
241
241
module GetCheckRuns =
242
- [% graphql
243
- {|
242
+ [% graphql
243
+ {|
244
244
query getCheckRuns($ appId: Int!, $owner: String!, $repo: String!, $commit: String!, $context: String! ) {
245
245
repository(owner:$owner, name:$repo ) {
246
246
obj : object (expression : $ commit) {
@@ -266,8 +266,8 @@ module GetCheckRuns =
266
266
| }]
267
267
268
268
module GetLabel =
269
- [% graphql
270
- {|
269
+ [% graphql
270
+ {|
271
271
query getLabels($ owner: String!, $repo: String!, $label: String! ) {
272
272
repository(owner:$owner, name:$repo ) {
273
273
label(name: $label ) {
@@ -278,8 +278,8 @@ module GetLabel =
278
278
| }]
279
279
280
280
module GetOpenPullRequestWithLabel =
281
- [% graphql
282
- {|
281
+ [% graphql
282
+ {|
283
283
284
284
query getOpenPullRequestWithLabel($ owner: String!, $repo:String!, $label:String!, $cursor: String, $len: Int! ) {
285
285
repository(name: $repo,owner:$owner ) {
@@ -299,8 +299,8 @@ query getOpenPullRequestWithLabel($owner: String!, $repo:String!, $label:String!
299
299
| }]
300
300
301
301
module GetPullRequestLabelTimeline =
302
- [% graphql
303
- {|
302
+ [% graphql
303
+ {|
304
304
fragment Label on Label {
305
305
name
306
306
}
@@ -331,8 +331,8 @@ query getPullRequestLabelTimeline($owner: String!, $repo:String!, $prNumber: Int
331
331
| }]
332
332
333
333
module GetPullRequestLabels =
334
- [% graphql
335
- {|
334
+ [% graphql
335
+ {|
336
336
337
337
query getPullRequestLabels($ owner: String!, $repo:String!, $prNumber: Int!, $cursor: String, $len: Int! ) {
338
338
repository(name: $repo,owner:$owner ) {
@@ -353,8 +353,8 @@ query getPullRequestLabels($owner: String!, $repo:String!, $prNumber: Int!, $cur
353
353
| }]
354
354
355
355
module GetBaseAndHeadChecks =
356
- [% graphql
357
- {|
356
+ [% graphql
357
+ {|
358
358
fragment CheckRuns on CheckRunConnection {
359
359
nodes {
360
360
name
@@ -400,8 +400,8 @@ query getChecks($appId: Int!, $owner: String!, $repo:String!, $prNumber: Int!, $
400
400
| }]
401
401
402
402
module GetPipelineSummary =
403
- [% graphql
404
- {|
403
+ [% graphql
404
+ {|
405
405
query getChecks($ appId: Int!, $owner: String!, $repo:String!, $head: String! ) {
406
406
repository(name: $repo,owner:$owner ) {
407
407
getPipelineSummaryCommit : object (expression : $ head) {
@@ -422,8 +422,8 @@ query getChecks($appId: Int!, $owner: String!, $repo:String!, $head: String!) {
422
422
| }]
423
423
424
424
module GetProjectFieldValues =
425
- [% graphql
426
- {|
425
+ [% graphql
426
+ {|
427
427
query getProjectFieldValues($ organization: String!, $project: Int!, $field: String!, $options: [String!]! ) {
428
428
organization(login: $organization ) {
429
429
projectV2(number: $project ) {
@@ -445,8 +445,8 @@ query getProjectFieldValues($organization: String!, $project: Int!, $field: Stri
445
445
(* Mutations *)
446
446
447
447
module AddCardToProject =
448
- [% graphql
449
- {|
448
+ [% graphql
449
+ {|
450
450
mutation addCard($ card_id:ID!, $project_id: ID! ) {
451
451
addProjectV2ItemById(input:{contentId:$card_id,projectId:$project_id} ) {
452
452
item {
@@ -457,8 +457,8 @@ module AddCardToProject =
457
457
| }]
458
458
459
459
module UpdateFieldValue =
460
- [% graphql
461
- {|
460
+ [% graphql
461
+ {|
462
462
mutation updateFieldValue($ card_id:ID!, $project_id: ID!, $field_id: ID!, $field_value_id: String! ) {
463
463
updateProjectV2ItemFieldValue(input: {projectId: $project_id, itemId: $card_id, fieldId: $field_id, value: {singleSelectOptionId: $field_value_id}} ) {
464
464
clientMutationId
@@ -467,8 +467,8 @@ module UpdateFieldValue =
467
467
| }]
468
468
469
469
module CreateNewReleaseManagementField =
470
- [% graphql
471
- {|
470
+ [% graphql
471
+ {|
472
472
mutation createNewField($ project_id: ID!, $field: String! ) {
473
473
createProjectV2Field(input: {projectId: $project_id, dataType: SINGLE_SELECT, name: $field, singleSelectOptions: [{name: "Request inclusion", color: GREEN, description: "This merged pull request is proposed for inclusion."}, {name: "Shipped", color: PURPLE, description: "This pull request has been backported (or merged directly in the release branch )." }, {name: " Rejected " , color: RED, description: " This merged pull request will not be included in this release." }]}) {
474
474
projectV2Field {
@@ -485,8 +485,8 @@ module CreateNewReleaseManagementField =
485
485
|}]
486
486
487
487
module PostComment =
488
- [%graphql
489
- {|
488
+ [%graphql
489
+ {|
490
490
mutation addComment($id:ID!,$message:String!) {
491
491
payload: addComment(input:{subjectId:$id,body:$message}) {
492
492
commentEdge {
@@ -499,8 +499,8 @@ module PostComment =
499
499
|}]
500
500
501
501
module UpdateMilestone =
502
- [%graphql
503
- {|
502
+ [%graphql
503
+ {|
504
504
mutation updateMilestone($issue: ID!, $milestone: ID!) {
505
505
updateIssue(input: {id: $issue, milestoneId: $milestone}) {
506
506
clientMutationId
@@ -509,8 +509,8 @@ module UpdateMilestone =
509
509
|}]
510
510
511
511
module MergePullRequest =
512
- [%graphql
513
- {|
512
+ [%graphql
513
+ {|
514
514
mutation mergePullRequest($pr_id: ID!, $commit_headline: String,
515
515
$commit_body: String, $merge_method: PullRequestMergeMethod) {
516
516
mergePullRequest(
@@ -527,8 +527,8 @@ module MergePullRequest =
527
527
|}]
528
528
529
529
module ClosePullRequest =
530
- [%graphql
531
- {|
530
+ [%graphql
531
+ {|
532
532
mutation closePullRequest($pr_id: ID!) {
533
533
closePullRequest(
534
534
input: {pullRequestId: $pr_id}) {
@@ -540,8 +540,8 @@ module ClosePullRequest =
540
540
|}]
541
541
542
542
module LabelIssue =
543
- [%graphql
544
- {|
543
+ [%graphql
544
+ {|
545
545
mutation labelIssue($issue_id: ID!, $label_ids: [ID!]!) {
546
546
addLabelsToLabelable(
547
547
input: {labelableId: $issue_id, labelIds:$label_ids}) {
@@ -551,8 +551,8 @@ module LabelIssue =
551
551
|}]
552
552
553
553
module UnlabelIssue =
554
- [%graphql
555
- {|
554
+ [%graphql
555
+ {|
556
556
mutation unlabelIssue($issue_id: ID!, $label_ids: [ID!]!) {
557
557
removeLabelsFromLabelable(
558
558
input: {labelableId: $issue_id, labelIds:$label_ids}) {
@@ -562,8 +562,8 @@ module UnlabelIssue =
562
562
|}]
563
563
564
564
module NewCheckRun =
565
- [%graphql
566
- {|
565
+ [%graphql
566
+ {|
567
567
mutation newCheckRun($name: String!, $repoId: ID!, $headSha: String!,
568
568
$status: RequestableCheckStatusState!, $title: String!, $text: String, $summary: String!,
569
569
$url: String!, $conclusion: CheckConclusionState, $externalId: String) {
@@ -590,8 +590,8 @@ module NewCheckRun =
590
590
|}]
591
591
592
592
module UpdateCheckRun =
593
- [%graphql
594
- {|
593
+ [%graphql
594
+ {|
595
595
mutation updateCheckRun($checkRunId: ID!, $repoId: ID!
596
596
$conclusion: CheckConclusionState!, $title: String!, $text: String,
597
597
$url: String, $summary: String!) {
0 commit comments