Summary
add_labels.cjs (used in the Process Safe Outputs job) fails to find labels that exist in the target repository because it only fetches the first page (≤100) of labels from the REST API.
Observed behavior
When a repository has more than 100 labels, the script logs:
Could not find label IDs for: done-by-agentic-workflow, done-by-claude-code, automation, qa
These labels may not exist in the repository. Available labels: bug, docs, duplicate, ...
The "Available labels" list ends at exactly 100 entries — the page 1 limit of GET /repos/{owner}/{repo}/labels. Labels that exist beyond page 1 are silently skipped and treated as non-existent.
Root cause
The label ID lookup fetches /repos/{owner}/{repo}/labels without paginating through all pages, so only the first 100 labels are considered.
Suggested fix
Either:
- Paginate through all pages before building the label name→ID map, or
- Look up each label individually via
GET /repos/{owner}/{repo}/labels/{name} instead of listing all labels upfront
🤖 Reported with Claude Code
Summary
add_labels.cjs(used in theProcess Safe Outputsjob) fails to find labels that exist in the target repository because it only fetches the first page (≤100) of labels from the REST API.Observed behavior
When a repository has more than 100 labels, the script logs:
The "Available labels" list ends at exactly 100 entries — the page 1 limit of
GET /repos/{owner}/{repo}/labels. Labels that exist beyond page 1 are silently skipped and treated as non-existent.Root cause
The label ID lookup fetches
/repos/{owner}/{repo}/labelswithout paginating through all pages, so only the first 100 labels are considered.Suggested fix
Either:
GET /repos/{owner}/{repo}/labels/{name}instead of listing all labels upfront🤖 Reported with Claude Code