Serve gh release over the GitHub compatibility layer4951bed13 hours ago242 lines · 8.2 KB | 1 | [ |
| 2 | { |
| 3 | "command": "gh pr create -R <host>/<login>/tools --head chore --base main --title A chore --body ", |
| 4 | "requests": |
| 5 | { |
| 6 | "method": |
| 7 | "path": |
| 8 | "query": |
| 9 | "headers": |
| 10 | "accept": |
| 11 | "content-type": |
| 12 | "x-github-api-version": |
| 13 | }, |
| 14 | "body": |
| 15 | "status": |
| 16 | }, |
| 17 | { |
| 18 | "method": |
| 19 | "path": |
| 20 | "query": |
| 21 | "headers": |
| 22 | "accept": |
| 23 | "content-type": |
| 24 | "graphql-features": |
| 25 | "x-github-api-version": |
| 26 | }, |
| 27 | "body": |
| 28 | "query": |
| 29 | "variables": |
| 30 | "input": |
| 31 | "baseRefName": |
| 32 | "body": |
| 33 | "draft": |
| 34 | "headRefName": |
| 35 | "maintainerCanModify": |
| 36 | "repositoryId": |
| 37 | "title": |
| 38 | } |
| 39 | } |
| 40 | }, |
| 41 | "status": |
| 42 | }, |
| 43 | { |
| 44 | "method": |
| 45 | "path": |
| 46 | "query": |
| 47 | "headers": |
| 48 | "accept": |
| 49 | "content-type": |
| 50 | "graphql-features": |
| 51 | "x-github-api-version": |
| 52 | }, |
| 53 | "body": |
| 54 | "query": |
| 55 | "variables": |
| 56 | "name": |
| 57 | "owner": |
| 58 | } |
| 59 | }, |
| 60 | "status": |
| 61 | }, |
| 62 | { |
| 63 | "method": |
| 64 | "path": |
| 65 | "query": |
| 66 | "headers": |
| 67 | "accept": |
| 68 | "content-type": |
| 69 | "graphql-features": |
| 70 | "x-github-api-version": |
| 71 | }, |
| 72 | "body": |
| 73 | "query": |
| 74 | "variables": |
| 75 | "headRefName": |
| 76 | "owner": |
| 77 | "repo": |
| 78 | "states": |
| 79 | "OPEN" |
| 80 | ] |
| 81 | } |
| 82 | }, |
| 83 | "status": |
| 84 | }, |
| 85 | { |
| 86 | "method": |
| 87 | "path": |
| 88 | "query": |
| 89 | "headers": |
| 90 | "accept": |
| 91 | "content-type": |
| 92 | "graphql-features": |
| 93 | "x-github-api-version": |
| 94 | }, |
| 95 | "body": |
| 96 | "query": |
| 97 | }, |
| 98 | "status": |
| 99 | } |
| 100 | ] |
| 101 | }, |
| 102 | { |
| 103 | "command": |
| 104 | "requests": |
| 105 | { |
| 106 | "method": |
| 107 | "path": |
| 108 | "query": |
| 109 | "headers": |
| 110 | "accept": |
| 111 | "content-type": |
| 112 | "graphql-features": |
| 113 | "x-github-api-version": |
| 114 | }, |
| 115 | "body": |
| 116 | "query": |
| 117 | "variables": |
| 118 | "owner": |
| 119 | "pr_number": |
| 120 | "repo": |
| 121 | } |
| 122 | }, |
| 123 | "status": |
| 124 | }, |
| 125 | { |
| 126 | "method": |
| 127 | "path": |
| 128 | "query": |
| 129 | "headers": |
| 130 | "accept": |
| 131 | "content-type": |
| 132 | "graphql-features": |
| 133 | "x-github-api-version": |
| 134 | }, |
| 135 | "body": |
| 136 | "query": |
| 137 | "variables": |
| 138 | "input": |
| 139 | "pullRequestId": |
| 140 | } |
| 141 | } |
| 142 | }, |
| 143 | "status": |
| 144 | } |
| 145 | ] |
| 146 | }, |
| 147 | { |
| 148 | "command": |
| 149 | "requests": |
| 150 | { |
| 151 | "method": |
| 152 | "path": |
| 153 | "query": |
| 154 | "headers": |
| 155 | "accept": |
| 156 | "content-type": |
| 157 | "graphql-features": |
| 158 | "x-github-api-version": |
| 159 | }, |
| 160 | "body": |
| 161 | "query": |
| 162 | "variables": |
| 163 | "owner": |
| 164 | "pr_number": |
| 165 | "repo": |
| 166 | } |
| 167 | }, |
| 168 | "status": |
| 169 | } |
| 170 | ] |
| 171 | }, |
| 172 | { |
| 173 | "command": |
| 174 | "requests": |
| 175 | { |
| 176 | "method": |
| 177 | "path": |
| 178 | "query": |
| 179 | "headers": |
| 180 | "accept": |
| 181 | "content-type": |
| 182 | "graphql-features": |
| 183 | "x-github-api-version": |
| 184 | }, |
| 185 | "body": |
| 186 | "query": |
| 187 | "variables": |
| 188 | "owner": |
| 189 | "pr_number": |
| 190 | "repo": |
| 191 | } |
| 192 | }, |
| 193 | "status": |
| 194 | }, |
| 195 | { |
| 196 | "method": |
| 197 | "path": |
| 198 | "query": |
| 199 | "headers": |
| 200 | "accept": |
| 201 | "content-type": |
| 202 | "graphql-features": |
| 203 | "x-github-api-version": |
| 204 | }, |
| 205 | "body": |
| 206 | "query": |
| 207 | "variables": |
| 208 | "input": |
| 209 | "pullRequestId": |
| 210 | } |
| 211 | } |
| 212 | }, |
| 213 | "status": |
| 214 | } |
| 215 | ] |
| 216 | }, |
| 217 | { |
| 218 | "command": |
| 219 | "requests": |
| 220 | { |
| 221 | "method": |
| 222 | "path": |
| 223 | "query": |
| 224 | "headers": |
| 225 | "accept": |
| 226 | "content-type": |
| 227 | "graphql-features": |
| 228 | "x-github-api-version": |
| 229 | }, |
| 230 | "body": |
| 231 | "query": |
| 232 | "variables": |
| 233 | "owner": |
| 234 | "pr_number": |
| 235 | "repo": |
| 236 | } |
| 237 | }, |
| 238 | "status": |
| 239 | } |
| 240 | ] |
| 241 | } |
| 242 | ] |
[
"
GET
"
,
"
/api/v3/meta
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
2022-11-28
"
null
,
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t\t
mutation PullRequestCreate($input: CreatePullRequestInput!) {
\n\t\t\t
createPullRequest(input: $input) {
\n\t\t\t\t
pullRequest {
\n\t\t\t\t\t
id
\n\t\t\t\t\t
url
\n\t\t\t\t
}
\n\t\t\t
}
\n\t
}
"
,
{
{
"
main
"
,
""
,
false
,
"
chore
"
,
true
,
"
R_<id>
"
,
"
A chore
"
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
fragment repo on Repository {
\n\t\t
id
\n\t\t
databaseId
\n\t\t
name
\n\t\t
owner { login }
\n\t\t
sshUrl
\n\t\t
hasIssuesEnabled
\n\t\t
description
\n\t\t
hasWikiEnabled
\n\t\t
viewerPermission
\n\t\t
defaultBranchRef {
\n\t\t\t
name
\n\t\t
}
\n\t
}
\n\n\t
query RepositoryInfo($owner: String!, $name: String!) {
\n\t\t
repository(owner: $owner, name: $name) {
\n\t\t\t
...repo
\n\t\t\t
parent {
\n\t\t\t\t
...repo
\n\t\t\t
}
\n\t\t\t
mergeCommitAllowed
\n\t\t\t
rebaseMergeAllowed
\n\t\t\t
squashMergeAllowed
\n\t\t
}
\n\t
}
"
,
{
"
tools
"
,
"
<login>
"
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
query PullRequestForBranch($owner: String!, $repo: String!, $headRefName: String!, $states: [PullRequestState!]) {
\n\t\t
repository(owner: $owner, name: $repo) {
\n\t\t\t
pullRequests(headRefName: $headRefName, states: $states, first: 30, orderBy: { field: CREATED_AT, direction: DESC }) {
\n\t\t\t\t
nodes {url,id,number,state,baseRefName,headRefName,isCrossRepository,headRepositoryOwner{id,login,...on User{name}}}
\n\t\t\t
}
\n\t\t\t
defaultBranchRef { name }
\n\t\t
}
\n\t
}
"
,
{
"
chore
"
,
"
<login>
"
,
"
tools
"
,
[
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
query Issue_fields{Issue: __type(name:
\"
Issue
\"
){fields(includeDeprecated: true){name}}}
"
200
"
gh pr close 5 -R <host>/<login>/tools
"
,
[
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {
\n\t\t
repository(owner: $owner, name: $repo) {
\n\t\t\t
pullRequest(number: $pr_number) {state,number,title,isCrossRepository,headRefName,id}
\n\t\t
}
\n\t
}
"
,
{
"
<login>
"
,
5
,
"
tools
"
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
mutation PullRequestClose($input:ClosePullRequestInput!){closePullRequest(input: $input){pullRequest{id}}}
"
,
{
{
"
PR_<id>
"
200
"
gh pr view 5 -R <host>/<login>/tools --json state
"
,
[
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {
\n\t\t
repository(owner: $owner, name: $repo) {
\n\t\t\t
pullRequest(number: $pr_number) {state,id,number}
\n\t\t
}
\n\t
}
"
,
{
"
<login>
"
,
5
,
"
tools
"
200
"
gh pr reopen 5 -R <host>/<login>/tools
"
,
[
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {
\n\t\t
repository(owner: $owner, name: $repo) {
\n\t\t\t
pullRequest(number: $pr_number) {id,number,state,title}
\n\t\t
}
\n\t
}
"
,
{
"
<login>
"
,
5
,
"
tools
"
200
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
mutation PullRequestReopen($input:ReopenPullRequestInput!){reopenPullRequest(input: $input){pullRequest{id}}}
"
,
{
{
"
PR_<id>
"
200
"
gh pr view 5 -R <host>/<login>/tools --json state
"
,
[
"
POST
"
,
"
/api/graphql
"
,
{}
,
{
"
application/json
"
,
"
application/json; charset=utf-8
"
,
"
merge_queue
"
,
"
2022-11-28
"
{
"
\n\t
query PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {
\n\t\t
repository(owner: $owner, name: $repo) {
\n\t\t\t
pullRequest(number: $pr_number) {state,id,number}
\n\t\t
}
\n\t
}
"
,
{
"
<login>
"
,
5
,
"
tools
"
200