MCPcopy Create free account
hub / github.com/anomalyco/opencode / fetchPR

Function fetchPR

packages/opencode/src/cli/cmd/github.handler.ts:1434–1530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1432 }
1433
1434 async function fetchPR() {
1435 console.log("Fetching prompt data for PR...")
1436 const prResult = await octoGraph<PullRequestQueryResponse>(
1437 `
1438query($owner: String!, $repo: String!, $number: Int!) {
1439 repository(owner: $owner, name: $repo) {
1440 pullRequest(number: $number) {
1441 title
1442 body
1443 author {
1444 login
1445 }
1446 baseRefName
1447 headRefName
1448 headRefOid
1449 createdAt
1450 additions
1451 deletions
1452 state
1453 baseRepository {
1454 nameWithOwner
1455 }
1456 headRepository {
1457 nameWithOwner
1458 }
1459 commits(first: 100) {
1460 totalCount
1461 nodes {
1462 commit {
1463 oid
1464 message
1465 author {
1466 name
1467 email
1468 }
1469 }
1470 }
1471 }
1472 files(first: 100) {
1473 nodes {
1474 path
1475 additions
1476 deletions
1477 changeType
1478 }
1479 }
1480 comments(first: 100) {
1481 nodes {
1482 id
1483 databaseId
1484 body
1485 author {
1486 login
1487 }
1488 createdAt
1489 }
1490 }
1491 reviews(first: 100) {

Callers 1

github.handler.tsFile · 0.70

Calls 1

logMethod · 0.45

Tested by

no test coverage detected