Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Martian-Engineering/pr-sheriff
/ functions
Functions
153 in github.com/Martian-Engineering/pr-sheriff
⨍
Functions
153
◇
Types & classes
2
↓ 25 callers
Function
yamlQuote
* @param {string} s * @returns {string}
scripts/qmd-corpus-index.js:190
↓ 18 callers
Function
yamlScalar
* @param {any} v * @returns {string}
scripts/qmd-corpus-index.js:198
↓ 10 callers
Function
addNode
(graph, node)
src/graph/reference_graph_builder.mjs:11
↓ 9 callers
Function
assertString
(v, path)
src/llm/judge_schema.mjs:159
↓ 8 callers
Function
env
(name: string)
src/config/loadConfig.ts:17
↓ 8 callers
Function
readFixture
(name)
test/github_fetch.test.mjs:12
↓ 8 callers
Function
usageAndExit
(code)
scripts/qmd-corpus-index.js:108
↓ 7 callers
Function
prNodeId
({ owner, repo, number })
src/graph/reference_graph_builder.mjs:3
↓ 6 callers
Function
addEdge
(graph, edge)
src/graph/reference_graph_builder.mjs:15
↓ 6 callers
Function
ghApi
* Call `gh api` with optional headers and pagination, returning parsed JSON. * * Note: `gh api --paginate` returns a single JSON array for array end
scripts/pr-supersession-single.js:76
↓ 6 callers
Function
parseArgs
* @param {string[]} argv * @returns {Args}
scripts/qmd-corpus-index.js:34
↓ 6 callers
Function
truncate
(str, max = 2000)
scripts/pr-supersession-single.js:102
↓ 5 callers
Method
getPR
* Fetch pull request details.
src/github/github_fetch.mjs:109
↓ 5 callers
Function
issueNodeId
({ owner, repo, number })
src/graph/reference_graph_builder.mjs:7
↓ 5 callers
Function
uniqNumbers
(nums: number[])
src/commands/subcommands/analyzePr.ts:40
↓ 5 callers
Function
uniquePush
(arr, value)
src/graph/reference_graph_builder.mjs:19
↓ 5 callers
Function
validateJudgeResult
(value)
src/llm/judge_schema.mjs:232
↓ 4 callers
Function
assertNoExtraKeys
(obj, allowedKeys, path)
src/llm/judge_schema.mjs:151
↓ 4 callers
Function
cacheKey
(parts)
src/github/file_cache.mjs:14
↓ 4 callers
Function
ghListAll
* Manual pagination so we can stop early when `--since` is used. * * @param {(page: number) => string} endpointForPage * @param {(items: any[]) =>
scripts/qmd-corpus-index.js:153
↓ 4 callers
Function
isObject
(v)
src/llm/judge_schema.mjs:147
↓ 4 callers
Function
makeStubRunner
(stdoutResponses)
test/github_fetch.test.mjs:16
↓ 4 callers
Function
makeValid
()
test/judge_schema.test.mjs:6
↓ 4 callers
Function
normalizeBody
* @param {string} s * @returns {string}
scripts/qmd-corpus-index.js:251
↓ 4 callers
Function
printJson
(value: unknown)
src/output/printJson.ts:6
↓ 4 callers
Function
readJsonCache
({ cacheDir, key, ttlSeconds, nowMs = Date.now() })
src/github/file_cache.mjs:30
↓ 4 callers
Function
writeJsonCache
({ cacheDir, key, value })
src/github/file_cache.mjs:45
↓ 4 callers
Function
yamlStringList
* @param {string[]} items * @param {number} indent * @returns {string}
scripts/qmd-corpus-index.js:210
↓ 3 callers
Method
#restRequestRaw
({ method, endpoint })
src/github/github_fetch.mjs:347
↓ 3 callers
Function
add
(nRaw: string | undefined)
src/commands/subcommands/analyzePr.ts:53
↓ 3 callers
Function
assertOptionalString
(v, path)
src/llm/judge_schema.mjs:163
↓ 3 callers
Function
encodeQuery
(params)
src/github/github_fetch.mjs:14
↓ 3 callers
Function
extractReferencedNumbers
(text, { owner, repo })
src/graph/reference_extraction.mjs:16
↓ 3 callers
Function
getComments
(prNumber)
scripts/pr-supersession-single.js:216
↓ 3 callers
Method
getIssue
* Fetch issue details.
src/github/github_fetch.mjs:120
↓ 3 callers
Function
ghApiJson
* @param {string} endpoint * @param {string[]} extraArgs * @returns {any}
scripts/qmd-corpus-index.js:138
↓ 3 callers
Function
ghq
(endpoint)
scripts/pr-supersession-detector-simple.js:13
↓ 3 callers
Method
listPRComments
* List all comments on a PR: issue comments + PR review (inline) comments. * * @returns {Promise<{issueComments:any[], reviewComments:any[], all
src/github/github_fetch.mjs:133
↓ 3 callers
Function
parseJsonFromModelText
(text)
src/llm/judge_parse.mjs:37
↓ 3 callers
Function
retrieveCandidates
(opts: { summary: string; n: number; config: Pick<AppConfig, "qmdCollection" | "qmdIndex">; qmdRunner?
src/candidates/retrieveCandidates.ts:81
↓ 3 callers
Function
stripFirstCodeFence
(text)
src/llm/judge_parse.mjs:21
↓ 3 callers
Function
truncate
(str, max = 3000)
scripts/pr-supersession-detector-llm.js:35
↓ 2 callers
Method
#executeWithBackoff
(args, parseFn)
src/github/github_fetch.mjs:411
↓ 2 callers
Method
#restPaginateArray
({ endpoint, params = {}, useCache })
src/github/github_fetch.mjs:265
↓ 2 callers
Method
#restRequest
({ method, endpoint, params = undefined, useCache })
src/github/github_fetch.mjs:330
↓ 2 callers
Function
addIssueTimelineEdges
(issueNum, { maxPrs, edgeKindFor })
src/graph/reference_graph_builder.mjs:120
↓ 2 callers
Function
assertIntegerMin1
(v, path)
src/llm/judge_schema.mjs:174
↓ 2 callers
Function
assertNumber01
(v, path)
src/llm/judge_schema.mjs:168
↓ 2 callers
Function
bounds
* @param {any[]} events * @param {string} createdAtKey * @returns {{firstAt: string|null, lastAt: string|null}}
scripts/qmd-corpus-index.js:262
↓ 2 callers
Function
buildReferenceGraph
({ gh, owner, repo, prNumber, budgets = {}, })
src/graph/reference_graph_builder.mjs:51
↓ 2 callers
Function
cachePath
(cacheDir, key)
src/github/file_cache.mjs:23
↓ 2 callers
Function
corpusPath
* @param {string} owner * @param {string} repoName * @param {"pull"|"issue"} type * @param {number} number * @returns {string}
scripts/qmd-corpus-index.js:223
↓ 2 callers
Function
extractIssueNumbersFromPRAndComments
(pr, comments)
scripts/pr-supersession-single.js:159
↓ 2 callers
Function
extractIssueNumbersFromText
* Extract `#123`, PR URLs, and issue URLs from text. * * Notes: * - We keep the extraction intentionally permissive (false positives are OK). * -
src/commands/subcommands/analyzePr.ts:51
↓ 2 callers
Function
extractIssues
(body)
scripts/pr-supersession-detector.js:30
↓ 2 callers
Function
extractReferencedNumbersFromPRAndComments
(pr, comments, repo)
src/graph/reference_extraction.mjs:54
↓ 2 callers
Function
fetchIssueComments
* @param {string} repo * @param {number} number * @param {number} max * @returns {any[]}
scripts/qmd-corpus-index.js:442
↓ 2 callers
Function
fetchPRWithComments
(num)
src/graph/reference_graph_builder.mjs:89
↓ 2 callers
Function
getClosingPRNumbersForIssue
* Resolve a repo issue number to the PR(s) that closed it, via the issue timeline. * * Implementation detail: * - We look for "closed" timeline eve
scripts/pr-supersession-single.js:263
↓ 2 callers
Function
getComments
(prNumber)
scripts/pr-supersession-detector-llm.js:41
↓ 2 callers
Function
getCommentsCached
(prNumber)
scripts/pr-supersession-single.js:249
↓ 2 callers
Method
getIssueTimeline
* Fetch issue timeline events, including cross-references and "closed by" data. * * This uses GraphQL because REST issue timeline is still awkwa
src/github/github_fetch.mjs:158
↓ 2 callers
Function
getNumberKind
(num)
src/graph/reference_graph_builder.mjs:80
↓ 2 callers
Function
getPRCached
(prNumber)
scripts/pr-supersession-single.js:242
↓ 2 callers
Function
getRootHelp
()
src/cli/help.ts:3
↓ 2 callers
Function
gh
(query)
scripts/pr-supersession-single.js:57
↓ 2 callers
Function
isIssueNotPR
* Determine whether `issueNumber` is an Issue (not a PR) in this repo. * * GitHub models PRs as issues; the REST issue payload includes a `pull_requ
scripts/pr-supersession-single.js:143
↓ 2 callers
Function
isoDate
(date)
src/github/github_fetch.mjs:63
↓ 2 callers
Function
joinCorpus
* @param {string} root * @param {string} rel * @returns {string}
scripts/qmd-corpus-index.js:232
↓ 2 callers
Function
makeStubRunner
(responses)
test/candidates_retrieval.test.mjs:6
↓ 2 callers
Function
parseLinkHeader
(linkHeader)
src/github/github_fetch.mjs:49
↓ 2 callers
Function
parseScalar
(v: string)
src/candidates/parseFrontmatter.ts:16
↓ 2 callers
Function
pushChunk
(chunks, chunk)
src/github/gh_api_runner.mjs:36
↓ 2 callers
Function
redactConfig
(config: AppConfig)
src/config/redactConfig.ts:6
↓ 2 callers
Function
renderCommentsForPrompt
(comments, { indent = '', maxComments = 3 } = {})
scripts/pr-supersession-single.js:175
↓ 2 callers
Function
search
(query)
scripts/pr-supersession-detector-llm.js:30
↓ 2 callers
Function
search
(query)
scripts/pr-supersession-detector.js:26
↓ 2 callers
Function
splitHttpResponse
(raw)
src/github/github_fetch.mjs:24
↓ 2 callers
Function
validatePrLink
(item, path, opts)
src/llm/judge_schema.mjs:195
↓ 2 callers
Function
writeFileEnsuringDir
* @param {string} absPath * @param {string} content * @param {boolean} dryRun
scripts/qmd-corpus-index.js:241
↓ 1 callers
Method
#graphqlPaginateNodes
({ query, variables, extract, useCache })
src/github/github_fetch.mjs:356
↓ 1 callers
Method
#restPaginateSearch
({ endpoint, params = {}, useCache })
src/github/github_fetch.mjs:295
↓ 1 callers
Function
analyze
()
scripts/pr-supersession-single.js:446
↓ 1 callers
Function
analyzePR
(openPR, mergedPRs)
scripts/pr-supersession-detector-llm.js:84
↓ 1 callers
Function
analyzePr
(argv: string[], _ctx: CommandContext)
src/commands/subcommands/analyzePr.ts:147
↓ 1 callers
Function
assertStringArray
(v, path)
src/llm/judge_schema.mjs:178
↓ 1 callers
Function
batch
(argv: string[], _ctx: CommandContext)
src/commands/subcommands/batch.ts:4
↓ 1 callers
Function
buildIssueTraceContext
(targetPR, targetComments)
scripts/pr-supersession-single.js:327
↓ 1 callers
Function
buildJudgeSystemPrompt
()
src/llm/anthropic_judge.mjs:11
↓ 1 callers
Function
buildJudgeUserPrompt
(opts)
src/llm/anthropic_judge.mjs:29
↓ 1 callers
Function
callLLM
(prompt)
scripts/pr-supersession-detector-llm.js:61
↓ 1 callers
Function
callLLM
(prompt)
scripts/pr-supersession-single.js:184
↓ 1 callers
Function
candidates
(argv: string[], ctx: CommandContext)
src/commands/subcommands/candidates.ts:6
↓ 1 callers
Function
copyGithubMjs
()
scripts/copy-dist-assets.mjs:8
↓ 1 callers
Function
endpointForPage
(page)
scripts/qmd-corpus-index.js:444
↓ 1 callers
Function
ensureDir
(dirPath)
src/github/file_cache.mjs:19
↓ 1 callers
Function
extractGlobalOptions
(argv: string[])
src/cli/extractGlobalOptions.ts:5
↓ 1 callers
Function
extractIssueNumbers
* Extract issue references for the configured `REPO` from an arbitrary text blob. * * Examples matched: * - "#123" * - "owner/repo#123" (only if i
scripts/pr-supersession-single.js:114
↓ 1 callers
Function
fetchPullReviews
* @param {string} repo * @param {number} number * @param {number} max * @returns {any[]}
scripts/qmd-corpus-index.js:455
↓ 1 callers
Function
fileExists
(p: string)
src/config/paths.ts:5
next →
1–100 of 153, ranked by callers