INNER CODE UNIT · TypeScript

readPrFiles

NVIDIA/NemoClaw · .dsh/tools/approve_nemoclaw_fork_workflow_runs/index.ts:79

  const readPrFiles = async (number) => {
    const result = await tools.read_github_pages({
      workdir: input.workdir,
      repository: repo,
      path: `pulls/${number}/files`,
      pageSize: 100,
      pageLimit: 20,
    });
    if (result.truncated)
      throw new Error(
        `PR #${number} has more than 2000 files; refusing an incomplete review scope`,
      );
    const files = result.items.map((file) => file.filename);
    if (
      files.some((path) => typeof path !== "string" || !path || path.length > 4096) ||
      new Set(files).size !== files.length
    )
      throw new Error(`PR #${number} file response contains an invalid or duplicate path`);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…