gh.vim icon indicating copy to clipboard operation
gh.vim copied to clipboard

edit pull request body

Open skanehira opened this issue 4 years ago • 0 comments

👔 Overview

Use ghe to edit PR body.

👖 How to achieve

  1. Provid edit buffer named gh://:owner/:repo/pulls/:number

  2. Use GraphQL API to get PR body. https://docs.github.com/en/graphql/reference/objects#pullrequest

    query {
    repository(owner: "skanehira", name: "test") {
      pullRequest(number: 15) {
        body
      }
    }
    }
    
    {
    "data": {
      "repository": {
        "pullRequest": {
          "body": "## this is test\r\n"
        }
      }
    }
    }
    
  3. Use REST API to update PR body. https://docs.github.com/en/rest/reference/pulls#update-a-pull-request

🧦 Steps

  1. Open edit buffer
  2. Save buffer and update body.

skanehira avatar Feb 14 '21 05:02 skanehira