Skip to content

Run the issue-labeler over pull requests using polling#12294

Open
Copilot wants to merge 2 commits intomainfrom
copilot/refresh-pull-request-label-workflow
Open

Run the issue-labeler over pull requests using polling#12294
Copilot wants to merge 2 commits intomainfrom
copilot/refresh-pull-request-label-workflow

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Copilot-authored pull requests run workflows with permissions lower than other PRs (including those submitted by external contributors). This blocks the issue-labeler workflow from being able to run on those PRs, leaving a prompt for the workflow to be approved.

To run issue-labeler over these PRs as well as other PRs that have missed labeling (such as GitHub service interruptions when the events don't trigger), the PR label prediction workflow adds a cron schedule for as frequently as GitHub will run it (by using every 5 minutes). When triggered from the polling event, we collect the list of open and unlabeled PRs that have been updated since the last polling run (plus 5 extra minutes), and we run the issue-labeler prediction against those.

This also updates the workflow_dispatch event to allow an empty list of PR numbers to force a polling event run.

Changes

  • Added scheduled polling: Cron trigger runs every 5 minutes
  • New poll-pull-requests job: Queries for open PRs without area labels, tracks last run timestamp to avoid redundant processing
  • Updated predict-pull-label job: Processes PRs from polling, workflow_dispatch, or pull_request_target events
  • Preserved configuration: LABEL_PREFIX: "area-", DEFAULT_LABEL: "needs-area-label" unchanged

Addresses (dotnet/issue-labeler#105) Pull Request Labeling does not run automatically for Copilot PRs for this repository.

Replicates dotnet/.github#20 and dotnet/runtime#124023.

Original prompt

Replicate the change in dotnet/.github#20 to this repo, refreshing the pull request labeling workflow. Respect current configuration of the workflow such as the default label and label prefix, without changing those. Use the same PR title and description as dotnet/runtime#124023, adding a link to dotnet/.github#20 and dotnet/runtime#124023 PR in the bottom of the PR description for reference.

Created from Copilot CLI via the copilot delegate command.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Copilot AI changed the title [WIP] Refresh pull request labeling workflow Run the issue-labeler over pull requests using polling Feb 7, 2026
Copilot AI requested a review from jeffhandley February 7, 2026 23:32
@jeffhandley jeffhandley marked this pull request as ready for review February 7, 2026 23:46
@jeffhandley jeffhandley requested a review from a team as a code owner February 7, 2026 23:46
Copilot AI review requested due to automatic review settings February 7, 2026 23:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the PR label prediction workflow to support scheduled polling so open PRs that missed automatic labeling (including Copilot-authored PRs with restricted workflow permissions) can still get area labels applied.

Changes:

  • Adds a 5-minute cron schedule trigger for polling.
  • Introduces a poll-pull-requests job to query open PRs lacking area-* labels and pass them to prediction.
  • Updates workflow_dispatch and the prediction job to support either explicit PR numbers or polling-derived PR numbers.

@jeffhandley jeffhandley enabled auto-merge (squash) February 8, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants