Skip to content

Instantly share code, notes, and snippets.

@suzuki-shunsuke
Created May 10, 2025 21:55
Show Gist options
  • Save suzuki-shunsuke/1385d89776de4e9d54a31fa22522e09c to your computer and use it in GitHub Desktop.
Save suzuki-shunsuke/1385d89776de4e9d54a31fa22522e09c to your computer and use it in GitHub Desktop.
When we get a GitHub Pull Request created by GitHub App using GraphQL API, the pull request author name doesn't have `[bot]` but a commit author has `[bot]`.
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
author {
login
}
commits(first: 30) {
nodes {
commit {
author {
user {
login
}
}
}
}
}
}
}
}
{
"data": {
"repository": {
"pullRequest": {
"author": {
"login": "dependabot"
},
"commits": {
"nodes": [
{
"commit": {
"author": {
"user": {
"login": "dependabot[bot]"
}
}
}
}
]
}
}
}
}
}
{
"owner": "aquaproj",
"repo": "aquaproj.github.io",
"pr": 1499
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment