Skip to content

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

Merged
jeffhandley merged 3 commits intomainfrom
copilot/update-pull-request-labeling-workflow
Feb 9, 2026
Merged

Run the issue-labeler over pull requests using polling#13223
jeffhandley merged 3 commits intomainfrom
copilot/update-pull-request-labeling-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.

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.

Notes

Retains existing LABEL_PREFIX: "Area: " and THRESHOLD: 0.40 configuration.

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.

@dotnet-policy-service
Copy link
Contributor

Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

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:05
@jeffhandley jeffhandley marked this pull request as ready for review February 8, 2026 00:09
@jeffhandley jeffhandley requested a review from a team as a code owner February 8, 2026 00:09
Copilot AI review requested due to automatic review settings February 8, 2026 00:09
@jeffhandley jeffhandley enabled auto-merge February 8, 2026 00:10
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

Adds a polling mechanism to the PR label prediction workflow so unlabeled PRs (including those where event-based runs are blocked or missed) can still be processed on a cadence.

Changes:

  • Add a 5-minute cron schedule trigger to poll for open PRs missing an Area: label.
  • Introduce a poll-pull-requests job that finds candidate PRs and passes them to the prediction job.
  • Update workflow_dispatch to allow empty pulls (treated as a poll) and update the prediction job to select PRs from either the event or poll output.
Comments suppressed due to low confidence (1)

.github/workflows/labeler-predict-pulls.yml:120

  • The workflow_dispatch cache_key input is defined (and required), but it is never passed to the dotnet/issue-labeler/restore action here. This makes the input misleading and prevents manual runs from selecting a non-default cache key. Consider wiring inputs.cache_key (with a default of ACTIVE) into the restore step’s cache_key input, consistent with labeler-cache-retention.yml / labeler-train.yml.
        uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
        with:
          type: pulls
          fail-on-cache-miss: ${{ env.ALLOW_FAILURE }}
          quiet: true

@jeffhandley jeffhandley merged commit 26f5151 into main Feb 9, 2026
10 checks passed
@jeffhandley jeffhandley deleted the copilot/update-pull-request-labeling-workflow branch February 9, 2026 10:34
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