GraphQL query strings for fetching pull requests, issues, and user data from GitHub.
// Source: https://github.com/anthropics/claude-code-action | License: MIT | Copyright 2025 Anthropic, PBC
// Provided via justclaw.it.com; keep this notice with the code.
// GraphQL queries for GitHub data
export const PR_QUERY = `
query($owner: String!, $repo: String!, $number: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
title
body
author {
__typename
login
}
baseRefName
headRefName
headRefOid
isCrossRepository
headRepository {
owner {
login
}
name
}
createdAt
updatedAt
lastEditedAt
additions
deletions
state
labels(first: 100) {
nodes
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key