getChangedFiles() — dead-code-hunter Function Reference
Architecture documentation for the getChangedFiles() function in index.ts from the dead-code-hunter codebase.
Entity Profile
Dependency Diagram
graph TD 2d958612_175d_170b_d202_1d8d208cb116["getChangedFiles()"] 1916269f_4df6_c8ce_0c1a_a8a66a4fb245["index.ts"] 2d958612_175d_170b_d202_1d8d208cb116 -->|defined in| 1916269f_4df6_c8ce_0c1a_a8a66a4fb245 0c3136ed_f7b1_d5d1_589e_7b15515e6598["run()"] 0c3136ed_f7b1_d5d1_589e_7b15515e6598 -->|calls| 2d958612_175d_170b_d202_1d8d208cb116 style 2d958612_175d_170b_d202_1d8d208cb116 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/index.ts lines 164–189
async function getChangedFiles(token: string): Promise<Set<string> | null> {
const pr = github.context.payload.pull_request;
if (!pr) return null;
const octokit = github.getOctokit(token);
const changedFiles = new Set<string>();
// Paginate through all changed files (PRs can have 300+ files)
for (let page = 1; ; page++) {
const { data: files } = await octokit.rest.pulls.listFiles({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
pull_number: pr.number,
per_page: 100,
page,
});
for (const file of files) {
changedFiles.add(file.filename);
}
if (files.length < 100) break;
}
return changedFiles;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getChangedFiles() do?
getChangedFiles() is a function in the dead-code-hunter codebase, defined in src/index.ts.
Where is getChangedFiles() defined?
getChangedFiles() is defined in src/index.ts at line 164.
What calls getChangedFiles()?
getChangedFiles() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free