Skip to content

[Bug]: ensurePullRequestLabel misses labels beyond first page #160

Description

@dearsishs

[Bug]: ensurePullRequestLabel fails when label exists beyond first 100 repo labels

Summary

ensurePullRequestLabel lists only the first page of repository labels. If the target label exists on a later page, creation is attempted, GitHub returns 422 already exists, and the label is never applied to the PR.

Steps to reproduce

  1. Repository with >100 labels including gittensor not on page 1.
  2. Run auto-label on a PR without the label applied.

Expected behavior

Label applied via POST .../issues/{n}/labels.

Actual behavior

Function errors or skips apply after failed create.

Impact

Auto-labeling fails on large active repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions