Skip to content

Commit d0d2d7c

Browse files
CopilotmarkcowlCopilot
authored
Add labeler policy to auto-apply int:azure-specs label on linter rule changes (#4517)
## Summary Adds a labeling policy (not a workflow) that automatically applies the `int:azure-specs` label to PRs when linter rule source files are modified. ## Approach Uses the repo's existing `.github/policies/` mechanism (same as `prs.triage.generated.yml`) rather than a GitHub Actions workflow. The policy triggers on `Pull_Request` events and applies the label when files match: - `packages/typespec-azure-core/src/rules/**/*` - `packages/typespec-azure-resource-manager/src/rules/**/*` - `packages/typespec-client-generator-core/src/rules/**/*` ## Why The `int:azure-specs` label triggers the External Integration workflow which validates that linter rule changes don't break existing Azure service specs. This automation ensures it's never forgotten. Closes #4516 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com> Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1277145 commit d0d2d7c

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
id: prs.linter-rule-integration
2+
name: Auto-apply int:azure-specs label on linter rule changes
3+
description: >-
4+
Automatically applies the int:azure-specs label to PRs that modify linter rule
5+
source files, ensuring the External Integration check is always triggered.
6+
resource: repository
7+
disabled: false
8+
configuration:
9+
resourceManagementConfiguration:
10+
eventResponderTasks:
11+
- if:
12+
- payloadType: Pull_Request
13+
then:
14+
- if:
15+
- includesModifiedFiles:
16+
files:
17+
- packages/typespec-azure-core/src/rules/**/*
18+
- packages/typespec-azure-resource-manager/src/rules/**/*
19+
- packages/typespec-client-generator-core/src/rules/**/*
20+
then:
21+
- addLabel:
22+
label: int:azure-specs

0 commit comments

Comments
 (0)