33(* Queries *)
44
55module PullRequest_Cards =
6- [% graphql
7- {|
6+ [% graphql
7+ {|
88 query prCards($ owner: String!, $repo: String!, $number: Int! ) {
99 repository(owner: $owner,name: $repo ) {
1010 pullRequest(number: $number ) {
@@ -22,8 +22,8 @@ module PullRequest_Cards =
2222| }]
2323
2424module PullRequest_ID =
25- [% graphql
26- {|
25+ [% graphql
26+ {|
2727 query prID($ owner: String!, $repo: String!, $number: Int! ) {
2828 repository(owner: $owner,name: $repo ) {
2929 pullRequest(number: $number ) {
@@ -34,8 +34,8 @@ module PullRequest_ID =
3434| }]
3535
3636module PullRequest_Milestone =
37- [% graphql
38- {|
37+ [% graphql
38+ {|
3939 query prInfo($ pr_id: ID! ) {
4040 node(id: $pr_id ) {
4141 ... on PullRequest {
@@ -49,8 +49,8 @@ module PullRequest_Milestone =
4949| }]
5050
5151module PullRequest_ID_and_Milestone =
52- [% graphql
53- {|
52+ [% graphql
53+ {|
5454 query prInfo($ owner: String!, $repo: String!, $number: Int! ) {
5555 repository(owner: $owner,name: $repo ) {
5656 pullRequest(number: $number ) {
@@ -65,8 +65,8 @@ module PullRequest_ID_and_Milestone =
6565| }]
6666
6767module Milestone_ID =
68- [% graphql
69- {|
68+ [% graphql
69+ {|
7070 query milestoneID($ owner: String!, $repo: String!, $number: Int! ) {
7171 repository(owner: $owner,name: $repo ) {
7272 milestone(number: $number ) {
@@ -77,8 +77,8 @@ module Milestone_ID =
7777| }]
7878
7979module TeamMembership =
80- [% graphql
81- {|
80+ [% graphql
81+ {|
8282 query teamMember($ org: String!, $team: String!, $user: String! ) {
8383 organization(login:$org ) {
8484 team(slug:$team ) {
@@ -99,8 +99,8 @@ module ParseAsString = struct
9999end
100100
101101module PullRequest_Refs =
102- [% graphql
103- {|
102+ [% graphql
103+ {|
104104 query prRefs($ owner: String!, $repo: String!, $number: Int! ) {
105105 repository(owner: $owner, name:$repo ) {
106106 pullRequest(number: $number ) {
@@ -129,8 +129,8 @@ module PullRequest_Refs =
129129| }]
130130
131131module Issue_Milestone =
132- [% graphql
133- {|
132+ [% graphql
133+ {|
134134 fragment Milestone on Milestone {
135135 id
136136 }
@@ -165,8 +165,8 @@ module Issue_Milestone =
165165| }]
166166
167167module PullRequestReviewsInfo =
168- [% graphql
169- {|
168+ [% graphql
169+ {|
170170 fragment Reviews on PullRequestReviewConnection {
171171 nodes {
172172 author { login }
@@ -203,8 +203,8 @@ module PullRequestReviewsInfo =
203203| }]
204204
205205module DefaultBranch =
206- [% graphql
207- {|
206+ [% graphql
207+ {|
208208 query defaultBranch($ owner: String!, $repo: String! ) {
209209 repository(owner: $owner, name: $repo ) {
210210 defaultBranchRef {
@@ -215,8 +215,8 @@ module DefaultBranch =
215215| }]
216216
217217module FileContent =
218- [% graphql
219- {|
218+ [% graphql
219+ {|
220220 query fileContent($ owner: String!, $repo: String!, $file: String! ) {
221221 repository(owner: $owner, name: $repo ) {
222222 file :object (expression : $ file) {
@@ -229,8 +229,8 @@ module FileContent =
229229| }]
230230
231231module RepoId =
232- [% graphql
233- {|
232+ [% graphql
233+ {|
234234 query repoId($ owner: String!, $repo: String! ) {
235235 repository(owner: $owner, name: $repo ) {
236236 id
@@ -239,8 +239,8 @@ module RepoId =
239239| }]
240240
241241module GetCheckRuns =
242- [% graphql
243- {|
242+ [% graphql
243+ {|
244244 query getCheckRuns($ appId: Int!, $owner: String!, $repo: String!, $commit: String!, $context: String! ) {
245245 repository(owner:$owner, name:$repo ) {
246246 obj : object (expression : $ commit) {
@@ -266,8 +266,8 @@ module GetCheckRuns =
266266| }]
267267
268268module GetLabel =
269- [% graphql
270- {|
269+ [% graphql
270+ {|
271271 query getLabels($ owner: String!, $repo: String!, $label: String! ) {
272272 repository(owner:$owner, name:$repo ) {
273273 label(name: $label ) {
@@ -278,8 +278,8 @@ module GetLabel =
278278| }]
279279
280280module GetOpenPullRequestWithLabel =
281- [% graphql
282- {|
281+ [% graphql
282+ {|
283283
284284query getOpenPullRequestWithLabel($ owner: String!, $repo:String!, $label:String!, $cursor: String, $len: Int! ) {
285285 repository(name: $repo,owner:$owner ) {
@@ -299,8 +299,8 @@ query getOpenPullRequestWithLabel($owner: String!, $repo:String!, $label:String!
299299| }]
300300
301301module GetPullRequestLabelTimeline =
302- [% graphql
303- {|
302+ [% graphql
303+ {|
304304fragment Label on Label {
305305 name
306306}
@@ -331,8 +331,8 @@ query getPullRequestLabelTimeline($owner: String!, $repo:String!, $prNumber: Int
331331| }]
332332
333333module GetPullRequestLabels =
334- [% graphql
335- {|
334+ [% graphql
335+ {|
336336
337337query getPullRequestLabels($ owner: String!, $repo:String!, $prNumber: Int!, $cursor: String, $len: Int! ) {
338338 repository(name: $repo,owner:$owner ) {
@@ -353,8 +353,8 @@ query getPullRequestLabels($owner: String!, $repo:String!, $prNumber: Int!, $cur
353353| }]
354354
355355module GetBaseAndHeadChecks =
356- [% graphql
357- {|
356+ [% graphql
357+ {|
358358fragment CheckRuns on CheckRunConnection {
359359 nodes {
360360 name
@@ -400,8 +400,8 @@ query getChecks($appId: Int!, $owner: String!, $repo:String!, $prNumber: Int!, $
400400| }]
401401
402402module GetPipelineSummary =
403- [% graphql
404- {|
403+ [% graphql
404+ {|
405405query getChecks($ appId: Int!, $owner: String!, $repo:String!, $head: String! ) {
406406 repository(name: $repo,owner:$owner ) {
407407 getPipelineSummaryCommit : object (expression : $ head) {
@@ -422,8 +422,8 @@ query getChecks($appId: Int!, $owner: String!, $repo:String!, $head: String!) {
422422| }]
423423
424424module GetProjectFieldValues =
425- [% graphql
426- {|
425+ [% graphql
426+ {|
427427query getProjectFieldValues($ organization: String!, $project: Int!, $field: String!, $options: [String!]! ) {
428428 organization(login: $organization ) {
429429 projectV2(number: $project ) {
@@ -445,8 +445,8 @@ query getProjectFieldValues($organization: String!, $project: Int!, $field: Stri
445445(* Mutations *)
446446
447447module AddCardToProject =
448- [% graphql
449- {|
448+ [% graphql
449+ {|
450450 mutation addCard($ card_id:ID!, $project_id: ID! ) {
451451 addProjectV2ItemById(input:{contentId:$card_id,projectId:$project_id} ) {
452452 item {
@@ -457,8 +457,8 @@ module AddCardToProject =
457457| }]
458458
459459module UpdateFieldValue =
460- [% graphql
461- {|
460+ [% graphql
461+ {|
462462 mutation updateFieldValue($ card_id:ID!, $project_id: ID!, $field_id: ID!, $field_value_id: String! ) {
463463 updateProjectV2ItemFieldValue(input: {projectId: $project_id, itemId: $card_id, fieldId: $field_id, value: {singleSelectOptionId: $field_value_id}} ) {
464464 clientMutationId
@@ -467,8 +467,8 @@ module UpdateFieldValue =
467467| }]
468468
469469module CreateNewReleaseManagementField =
470- [% graphql
471- {|
470+ [% graphql
471+ {|
472472 mutation createNewField($ project_id: ID!, $field: String! ) {
473473 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." }]}) {
474474 projectV2Field {
@@ -485,8 +485,8 @@ module CreateNewReleaseManagementField =
485485|}]
486486
487487module PostComment =
488- [%graphql
489- {|
488+ [%graphql
489+ {|
490490 mutation addComment($id:ID!,$message:String!) {
491491 payload: addComment(input:{subjectId:$id,body:$message}) {
492492 commentEdge {
@@ -499,8 +499,8 @@ module PostComment =
499499|}]
500500
501501module UpdateMilestone =
502- [%graphql
503- {|
502+ [%graphql
503+ {|
504504 mutation updateMilestone($issue: ID!, $milestone: ID!) {
505505 updateIssue(input: {id: $issue, milestoneId: $milestone}) {
506506 clientMutationId
@@ -509,8 +509,8 @@ module UpdateMilestone =
509509|}]
510510
511511module MergePullRequest =
512- [%graphql
513- {|
512+ [%graphql
513+ {|
514514 mutation mergePullRequest($pr_id: ID!, $commit_headline: String,
515515 $commit_body: String, $merge_method: PullRequestMergeMethod) {
516516 mergePullRequest(
@@ -527,8 +527,8 @@ module MergePullRequest =
527527|}]
528528
529529module ClosePullRequest =
530- [%graphql
531- {|
530+ [%graphql
531+ {|
532532 mutation closePullRequest($pr_id: ID!) {
533533 closePullRequest(
534534 input: {pullRequestId: $pr_id}) {
@@ -540,8 +540,8 @@ module ClosePullRequest =
540540|}]
541541
542542module LabelIssue =
543- [%graphql
544- {|
543+ [%graphql
544+ {|
545545 mutation labelIssue($issue_id: ID!, $label_ids: [ID!]!) {
546546 addLabelsToLabelable(
547547 input: {labelableId: $issue_id, labelIds:$label_ids}) {
@@ -551,8 +551,8 @@ module LabelIssue =
551551|}]
552552
553553module UnlabelIssue =
554- [%graphql
555- {|
554+ [%graphql
555+ {|
556556 mutation unlabelIssue($issue_id: ID!, $label_ids: [ID!]!) {
557557 removeLabelsFromLabelable(
558558 input: {labelableId: $issue_id, labelIds:$label_ids}) {
@@ -562,8 +562,8 @@ module UnlabelIssue =
562562|}]
563563
564564module NewCheckRun =
565- [%graphql
566- {|
565+ [%graphql
566+ {|
567567 mutation newCheckRun($name: String!, $repoId: ID!, $headSha: String!,
568568 $status: RequestableCheckStatusState!, $title: String!, $text: String, $summary: String!,
569569 $url: String!, $conclusion: CheckConclusionState, $externalId: String) {
@@ -590,8 +590,8 @@ module NewCheckRun =
590590|}]
591591
592592module UpdateCheckRun =
593- [%graphql
594- {|
593+ [%graphql
594+ {|
595595 mutation updateCheckRun($checkRunId: ID!, $repoId: ID!
596596 $conclusion: CheckConclusionState!, $title: String!, $text: String,
597597 $url: String, $summary: String!) {
0 commit comments