Created
May 10, 2025 21:55
-
-
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]`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"repository": { | |
"pullRequest": { | |
"author": { | |
"login": "dependabot" | |
}, | |
"commits": { | |
"nodes": [ | |
{ | |
"commit": { | |
"author": { | |
"user": { | |
"login": "dependabot[bot]" | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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