Skip to content

Instantly share code, notes, and snippets.

@brunoluiz
Last active July 23, 2019 19:05
Show Gist options
  • Save brunoluiz/6ed0fb22969eaff5f0c3b829fe82c01d to your computer and use it in GitHub Desktop.
Save brunoluiz/6ed0fb22969eaff5f0c3b829fe82c01d to your computer and use it in GitHub Desktop.
Github API tricks
mutation {
addPullRequestReview(input: {
clientMutationId:"client-test?",
pullRequestId:"MDExOlB1bGxSZXF1ZXN0MjU0MTc2Mzcy",
comments: [{
path: "content/blog/2019/feb/prettier/index.md",
body:"test",
position: 89
}]
event:COMMENT
}) {
clientMutationId
pullRequestReview {
body
}
}
}
query {
repository(owner: "brunoluiz", name:"brunoluiz.github.io") {
pullRequest(number: 3) {
title
id
headRefOid
files(first: 10) {
nodes {
path
}
}
reviews(last: 10) {
nodes {
comments(last: 20) {
nodes {
body
position
commit {
oid
}
}
}
}
}
}
object(expression: "f6fb6c9a359de6acd314ad281112652d752e8209:content/blog/2019/feb/prettier/index.md") {
repository {
name
}
... on Blob {
text
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment