Skip to content

Add deterministic GH workflow PR labeler - #69008

Merged
Youssef1313 merged 1 commit into
mainfrom
dev/ygerges/gh-workflow-labeler
Sep 3, 2026
Merged

Youssef1313 merged 1 commit into
mainfrom
dev/ygerges/gh-workflow-labeler

Conversation

@Youssef1313

@Youssef1313 Youssef1313 commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Adds a workflow that adds area-* labels to opened PRs based on the files changed.

The path to area label mapping is taken from the issue triage agentic workflow.

Tested on my fork and it works: Youssef1313#81

@Youssef1313
Youssef1313 requested review from a team and wtgodbe as code owners September 2, 2026 21:38
Copilot AI lite review requested due to automatic review settings September 2, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow’s labeling call can fail as an all-or-nothing operation if any label is invalid/missing, reducing reliability of the labeling behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a deterministic GitHub Actions workflow to automatically apply area-* labels to newly opened/reopened pull requests based on changed file paths, using a longest-prefix-wins mapping aligned with the issue triage area classification.

Changes:

  • Introduces a pull_request_target workflow that inspects PR changed files and derives one or more area-* labels.
  • Implements deterministic longest-path-prefix matching with a .props/.targets fallback to area-infrastructure.
  • Adds concurrency control to avoid concurrent labeling runs on the same PR.
File summaries
File Description
.github/workflows/labeler-area-paths.yml New workflow that classifies changed-file paths into area-* labels and applies them to PRs.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@Youssef1313 Youssef1313 added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Sep 3, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

@DeagleGross

Copy link
Copy Markdown
Member

Why do we need a deterministic PR labeler, if we have the issue-triage agent workflow, which should do this?

@DeagleGross

Copy link
Copy Markdown
Member

sorry missed that's it is PR labeler;

@Youssef1313
Youssef1313 merged commit 81a1db8 into main Sep 3, 2026
22 checks passed
@Youssef1313
Youssef1313 deleted the dev/ygerges/gh-workflow-labeler branch September 3, 2026 11:16
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants