MCPcopy Create free account
hub / github.com/backnotprop/plannotator / stackPRQuery

Function stackPRQuery

packages/shared/pr-github.ts:684–695  ·  view source on GitHub ↗
(kind: "head" | "base")

Source from the content-addressed store, hash-verified

682type StackPRNode = { number: number; title: string; url: string; baseRefName: string; headRefName: string; state: string };
683
684function stackPRQuery(kind: "head" | "base"): string {
685 const varName = kind === "head" ? "headRefName" : "baseRefName";
686 const first = kind === "head" ? 5 : 10;
687 return `
688query($owner: String!, $repo: String!, $${varName}: String!) {
689 repository(owner: $owner, name: $repo) {
690 pullRequests(first: ${first}, ${varName}: $${varName}, states: [OPEN, MERGED]) {
691 nodes { number title url baseRefName headRefName state }
692 }
693 }
694}`;
695}
696
697async function queryPRsByRef(
698 runtime: PRRuntime,

Callers 1

queryPRsByRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected