Skip to content

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

Merged
jeffhandley merged 4 commits intomainfrom
copilot/update-workflow-for-labeling
Feb 16, 2026
Merged

Run the issue-labeler over pull requests using polling#82333
jeffhandley merged 4 commits intomainfrom
copilot/update-workflow-for-labeling

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 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

  • Schedule trigger: Runs every 5 minutes (*/5 * * * *) to poll for unlabeled PRs
  • poll-pull-requests job: Queries open PRs updated since last successful run, filters those without Area- labels
  • workflow_dispatch enhancement: pulls parameter now optional; empty value triggers polling behavior
  • predict-pull-label updates: Routes PR numbers based on trigger type (manual with PRs, polling, or automatic on open)
  • Configuration: Added DEFAULT_LABEL: "needs-area-label", retained existing LABEL_PREFIX: "Area-"

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 from dotnet/.github#20 into this repository, updating the workflow for labeling pull requests. Retain the existing configuration for the default label and the label prefix while adding the functionality for polling and allowing manual poll triggers. The PR should be titled, "Run the issue-labeler over pull requests using polling" and it should have a description of: 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.

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.

Created from Copilot CLI via the copilot delegate command.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow for labeling pull requests with polling Run the issue-labeler over pull requests using polling Feb 8, 2026
Copilot AI requested a review from jeffhandley February 8, 2026 00:19
@jeffhandley jeffhandley marked this pull request as ready for review February 9, 2026 06:32
@jeffhandley jeffhandley requested a review from a team as a code owner February 9, 2026 06:32
Remove the default label for area labeling.
Removed default_label parameter from labeler step.
@jeffhandley jeffhandley requested a review from jjonescz February 14, 2026 23:06
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.

4 participants