The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | # Writes to a pull request and the remarks on it. Only pull request actions read their answer back, |
| 2 | # so clients can show the result without another read. |
| 3 | |
| 4 | fragment PullRequestActionSummary on PullRequest { |
| 5 | number |
| 6 | title |
| 7 | url |
| 8 | headRefName |
| 9 | baseRefName |
| 10 | state |
| 11 | isDraft |
| 12 | updatedAt |
| 13 | mergedAt |
| 14 | closedAt |
| 15 | headRefOid |
| 16 | author { |
| 17 | login |
| 18 | avatarUrl |
| 19 | ... on User { |
| 20 | name |
| 21 | } |
| 22 | } |
| 23 | autoMergeRequest { |
| 24 | mergeMethod |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | mutation AddReviewThreadReply($threadId: ID!, $body: String!) { |
| 29 | addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: $threadId, body: $body }) { |
| 30 | comment { |
| 31 | id |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | mutation AddReaction($subjectId: ID!, $content: ReactionContent!) { |
| 37 | addReaction(input: { subjectId: $subjectId, content: $content }) { |
| 38 | reaction { |
| 39 | content |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | mutation RemoveReaction($subjectId: ID!, $content: ReactionContent!) { |
| 45 | removeReaction(input: { subjectId: $subjectId, content: $content }) { |
| 46 | reaction { |
| 47 | content |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | mutation ResolveReviewThread($threadId: ID!) { |
| 53 | resolveReviewThread(input: { threadId: $threadId }) { |
| 54 | thread { |
| 55 | isResolved |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | mutation UnresolveReviewThread($threadId: ID!) { |
| 61 | unresolveReviewThread(input: { threadId: $threadId }) { |
| 62 | thread { |
| 63 | isResolved |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | # Rewrites the pull request's own words or its maintainer-edit setting. Every field is nullable so |
| 69 | # that one document serves any combination: a variable the request does not send puts no entry in |
| 70 | # the input at all, which leaves that field as it was rather than clearing it. |
| 71 | mutation UpdatePullRequest( |
| 72 | $pullRequestId: ID! |
| 73 | $title: String |
| 74 | $body: String |
| 75 | $maintainerCanModify: Boolean |
| 76 | ) { |
| 77 | updatePullRequest( |
| 78 | input: { |
| 79 | pullRequestId: $pullRequestId |
| 80 | title: $title |
| 81 | body: $body |
| 82 | maintainerCanModify: $maintainerCanModify |
| 83 | } |
| 84 | ) { |
| 85 | pullRequest { |
| 86 | id |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | # Creates a new pull request that reverses a merged pull request. |
| 92 | mutation RevertPullRequest($pullRequestId: ID!) { |
| 93 | revertPullRequest(input: { pullRequestId: $pullRequestId }) { |
| 94 | revertPullRequest { |
| 95 | id |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | # The two comment mutations name their comment differently; the variable is spelled the same in |
| 101 | # both, so a rewrite sends one set of variables whichever kind of remark it is. |
| 102 | mutation UpdateIssueComment($commentId: ID!, $body: String!) { |
| 103 | updateIssueComment(input: { id: $commentId, body: $body }) { |
| 104 | issueComment { |
| 105 | id |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | mutation UpdateReviewComment($commentId: ID!, $body: String!) { |
| 111 | updatePullRequestReviewComment(input: { pullRequestReviewCommentId: $commentId, body: $body }) { |
| 112 | pullRequestReviewComment { |
| 113 | id |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | # Clears one file, or puts it back. GitHub has no bulk form of either mutation, so |
| 119 | # `GraphQLResolver.aliased` repeats this under an alias per file and a burst of ticks is one |
| 120 | # request; `$viewed` picks which of the two each alias runs. |
| 121 | mutation SetFileViewed($pullRequestId: ID!, $path: String!, $viewed: Boolean!) { |
| 122 | markFileAsViewed(input: { pullRequestId: $pullRequestId, path: $path }) @include(if: $viewed) { |
| 123 | clientMutationId |
| 124 | } |
| 125 | unmarkFileAsViewed(input: { pullRequestId: $pullRequestId, path: $path }) @skip(if: $viewed) { |
| 126 | clientMutationId |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | mutation MergePullRequest($input: MergePullRequestInput!) { |
| 131 | mergePullRequest(input: $input) { |
| 132 | pullRequest { |
| 133 | ...PullRequestActionSummary |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | mutation EnablePullRequestAutoMerge($input: EnablePullRequestAutoMergeInput!) { |
| 139 | enablePullRequestAutoMerge(input: $input) { |
| 140 | pullRequest { |
| 141 | ...PullRequestActionSummary |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | mutation DisablePullRequestAutoMerge($pullRequestId: ID!) { |
| 147 | disablePullRequestAutoMerge(input: { pullRequestId: $pullRequestId }) { |
| 148 | pullRequest { |
| 149 | ...PullRequestActionSummary |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | mutation UpdatePullRequestBranch( |
| 155 | $pullRequestId: ID! |
| 156 | $expectedHeadOid: GitObjectID! |
| 157 | $updateMethod: PullRequestBranchUpdateMethod! |
| 158 | ) { |
| 159 | updatePullRequestBranch( |
| 160 | input: { |
| 161 | pullRequestId: $pullRequestId |
| 162 | expectedHeadOid: $expectedHeadOid |
| 163 | updateMethod: $updateMethod |
| 164 | } |
| 165 | ) { |
| 166 | pullRequest { |
| 167 | ...PullRequestActionSummary |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | mutation MarkPullRequestReadyForReview($pullRequestId: ID!) { |
| 173 | markPullRequestReadyForReview(input: { pullRequestId: $pullRequestId }) { |
| 174 | pullRequest { |
| 175 | ...PullRequestActionSummary |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | mutation ConvertPullRequestToDraft($pullRequestId: ID!) { |
| 181 | convertPullRequestToDraft(input: { pullRequestId: $pullRequestId }) { |
| 182 | pullRequest { |
| 183 | ...PullRequestActionSummary |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | mutation ClosePullRequest($pullRequestId: ID!) { |
| 189 | closePullRequest(input: { pullRequestId: $pullRequestId }) { |
| 190 | pullRequest { |
| 191 | ...PullRequestActionSummary |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | mutation ReopenPullRequest($pullRequestId: ID!) { |
| 197 | reopenPullRequest(input: { pullRequestId: $pullRequestId }) { |
| 198 | pullRequest { |
| 199 | ...PullRequestActionSummary |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | mutation AddComment($subjectId: ID!, $body: String!) { |
| 205 | addComment(input: { subjectId: $subjectId, body: $body }) { |
| 206 | clientMutationId |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | # Deletes a branch only while it still points at `beforeOid`, which `refUpdates` carries. |
| 211 | mutation DeletePullRequestBranch($input: UpdateRefsInput!) { |
| 212 | updateRefs(input: $input) { |
| 213 | clientMutationId |
| 214 | } |
| 215 | } |