diff --git a/.github/policies/label-issues.yml b/.github/policies/label-issues.yml index b2b2b9d86c..355129250e 100644 --- a/.github/policies/label-issues.yml +++ b/.github/policies/label-issues.yml @@ -68,7 +68,7 @@ configuration: - isAction: action: Closed - isActivitySender: - user: ${issueAuthor} + issueAuthor: true then: - addLabel: diff --git a/.github/policies/pullRequestManagement-serviceLabels.yml b/.github/policies/pullRequestManagement-serviceLabels.yml new file mode 100644 index 0000000000..cf50d75378 --- /dev/null +++ b/.github/policies/pullRequestManagement-serviceLabels.yml @@ -0,0 +1,65 @@ +id: pullRequestManagement.serviceLabels +name: GitOps.PullRequestServiceLabels +description: Checks the files touched by a pull request and assigns area labels. +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Add labels to PRs that touch certain files + triggerOnOwnActions: false + if: + - payloadType: Pull_Request + - or: + - isAction: + Opened + - isAction: + Synchronize + - not: + targetsBranch: + branch: live + then: + # Framework WPF + - if: + - filesMatchPattern: + pattern: '(?i).*dotnet-desktop-guide\/framework\/wpf.*' + then: + - addLabel: + label: 'dotnet-framework/svc' + - addLabel: + label: 'wpf/subsvc' + + # Framework WinForms + - if: + - filesMatchPattern: + pattern: '(?i).*dotnet-desktop-guide\/framework\/winforms.*' + then: + - addLabel: + label: 'dotnet-framework/svc' + - addLabel: + label: 'winforms/subsvc' + + # .NET WPF + - if: + - filesMatchPattern: + pattern: '(?i).*dotnet-desktop-guide\/net\/wpf.*' + then: + - addLabel: + label: 'dotnet-desktop/svc' + - addLabel: + label: 'wpf/subsvc' + + # .NET WinForms + - if: + - filesMatchPattern: + pattern: '(?i).*dotnet-desktop-guide\/net\/winforms.*' + then: + - addLabel: + label: 'dotnet-desktop/svc' + - addLabel: + label: 'winforms/subsvc' + +onFailure: +onSuccess: diff --git a/.repoman.yml b/.repoman.yml index 007c0c269b..0c5c7a053e 100644 --- a/.repoman.yml +++ b/.repoman.yml @@ -32,27 +32,6 @@ pull_request: # Set default sprint for new PRs - milestone-set: "![sprint]" - - - check: - - type: query - value: "PullRequest.Base.Ref != 'live'" - pass: - - files-changed: - - path: "(?i).*dotnet-desktop-guide\/framework\/wpf.*" - run: - - labels-add: ["dotnet-framework/svc", "wpf/subsvc"] - - - path: "(?i).*dotnet-desktop-guide\/framework\/winforms.*" - run: - - labels-add: ["dotnet-framework/svc", "winforms/subsvc"] - - - path: "(?i).*dotnet-desktop-guide\/net\/wpf.*" - run: - - labels-add: ["dotnet-desktop/svc", "wpf/subsvc"] - - - path: "(?i).*dotnet-desktop-guide\/net\/winforms.*" - run: - - labels-add: ["dotnet-desktop/svc", "winforms/subsvc"] projects_v2_item: