[
  {
    "command": "gh pr create -R <host>/<login>/tools --head chore --base main --title A chore --body ",
    "requests": [
      {
        "method": "GET",
        "path": "/api/v3/meta",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "x-github-api-version": "2022-11-28"
        },
        "body": null,
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\t\tmutation PullRequestCreate($input: CreatePullRequestInput!) {\n\t\t\tcreatePullRequest(input: $input) {\n\t\t\t\tpullRequest {\n\t\t\t\t\tid\n\t\t\t\t\turl\n\t\t\t\t}\n\t\t\t}\n\t}",
          "variables": {
            "input": {
              "baseRefName": "main",
              "body": "",
              "draft": false,
              "headRefName": "chore",
              "maintainerCanModify": true,
              "repositoryId": "R_<id>",
              "title": "A chore"
            }
          }
        },
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tfragment repo on Repository {\n\t\tid\n\t\tdatabaseId\n\t\tname\n\t\towner { login }\n\t\tsshUrl\n\t\thasIssuesEnabled\n\t\tdescription\n\t\thasWikiEnabled\n\t\tviewerPermission\n\t\tdefaultBranchRef {\n\t\t\tname\n\t\t}\n\t}\n\n\tquery RepositoryInfo($owner: String!, $name: String!) {\n\t\trepository(owner: $owner, name: $name) {\n\t\t\t...repo\n\t\t\tparent {\n\t\t\t\t...repo\n\t\t\t}\n\t\t\tmergeCommitAllowed\n\t\t\trebaseMergeAllowed\n\t\t\tsquashMergeAllowed\n\t\t}\n\t}",
          "variables": {
            "name": "tools",
            "owner": "<login>"
          }
        },
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tquery PullRequestForBranch($owner: String!, $repo: String!, $headRefName: String!, $states: [PullRequestState!]) {\n\t\trepository(owner: $owner, name: $repo) {\n\t\t\tpullRequests(headRefName: $headRefName, states: $states, first: 30, orderBy: { field: CREATED_AT, direction: DESC }) {\n\t\t\t\tnodes {url,id,number,state,baseRefName,headRefName,isCrossRepository,headRepositoryOwner{id,login,...on User{name}}}\n\t\t\t}\n\t\t\tdefaultBranchRef { name }\n\t\t}\n\t}",
          "variables": {
            "headRefName": "chore",
            "owner": "<login>",
            "repo": "tools",
            "states": [
              "OPEN"
            ]
          }
        },
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "query Issue_fields{Issue: __type(name: \"Issue\"){fields(includeDeprecated: true){name}}}"
        },
        "status": 200
      }
    ]
  },
  {
    "command": "gh pr close 5 -R <host>/<login>/tools",
    "requests": [
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tquery PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {\n\t\trepository(owner: $owner, name: $repo) {\n\t\t\tpullRequest(number: $pr_number) {state,number,title,isCrossRepository,headRefName,id}\n\t\t}\n\t}",
          "variables": {
            "owner": "<login>",
            "pr_number": 5,
            "repo": "tools"
          }
        },
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "mutation PullRequestClose($input:ClosePullRequestInput!){closePullRequest(input: $input){pullRequest{id}}}",
          "variables": {
            "input": {
              "pullRequestId": "PR_<id>"
            }
          }
        },
        "status": 200
      }
    ]
  },
  {
    "command": "gh pr view 5 -R <host>/<login>/tools --json state",
    "requests": [
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tquery PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {\n\t\trepository(owner: $owner, name: $repo) {\n\t\t\tpullRequest(number: $pr_number) {state,id,number}\n\t\t}\n\t}",
          "variables": {
            "owner": "<login>",
            "pr_number": 5,
            "repo": "tools"
          }
        },
        "status": 200
      }
    ]
  },
  {
    "command": "gh pr reopen 5 -R <host>/<login>/tools",
    "requests": [
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tquery PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {\n\t\trepository(owner: $owner, name: $repo) {\n\t\t\tpullRequest(number: $pr_number) {id,number,state,title}\n\t\t}\n\t}",
          "variables": {
            "owner": "<login>",
            "pr_number": 5,
            "repo": "tools"
          }
        },
        "status": 200
      },
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "mutation PullRequestReopen($input:ReopenPullRequestInput!){reopenPullRequest(input: $input){pullRequest{id}}}",
          "variables": {
            "input": {
              "pullRequestId": "PR_<id>"
            }
          }
        },
        "status": 200
      }
    ]
  },
  {
    "command": "gh pr view 5 -R <host>/<login>/tools --json state",
    "requests": [
      {
        "method": "POST",
        "path": "/api/graphql",
        "query": {},
        "headers": {
          "accept": "application/json",
          "content-type": "application/json; charset=utf-8",
          "graphql-features": "merge_queue",
          "x-github-api-version": "2022-11-28"
        },
        "body": {
          "query": "\n\tquery PullRequestByNumber($owner: String!, $repo: String!, $pr_number: Int!) {\n\t\trepository(owner: $owner, name: $repo) {\n\t\t\tpullRequest(number: $pr_number) {state,id,number}\n\t\t}\n\t}",
          "variables": {
            "owner": "<login>",
            "pr_number": 5,
            "repo": "tools"
          }
        },
        "status": 200
      }
    ]
  }
]
