From 705d9d2961eaedaba168fc80c40391c18cd79380 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:27:19 -0800 Subject: [PATCH 1/3] separate policy files --- .github/policies/assign-prs.yml | 18 + .github/policies/author-action.yml | 97 +++ .github/policies/community-contrib.yml | 49 ++ .github/policies/mention-owners.yml | 606 ++++++++++++++ .github/policies/resourceManagement.yml | 752 ------------------ .github/policies/scheduled-pr.yml | 18 + .github/policies/scheduledPR.yml | 34 - .../{untriaged.yml => untriaged-label.yml} | 4 +- 8 files changed, 789 insertions(+), 789 deletions(-) create mode 100644 .github/policies/assign-prs.yml create mode 100644 .github/policies/author-action.yml create mode 100644 .github/policies/community-contrib.yml create mode 100644 .github/policies/mention-owners.yml delete mode 100644 .github/policies/resourceManagement.yml create mode 100644 .github/policies/scheduled-pr.yml delete mode 100644 .github/policies/scheduledPR.yml rename .github/policies/{untriaged.yml => untriaged-label.yml} (96%) diff --git a/.github/policies/assign-prs.yml b/.github/policies/assign-prs.yml new file mode 100644 index 00000000000..6a0a72223a7 --- /dev/null +++ b/.github/policies/assign-prs.yml @@ -0,0 +1,18 @@ +name: GitOps.PullRequestIssueManagement +description: Assign team-authored PRs to author +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + - not: + activitySenderHasPermission: + permission: Read + then: + - assignTo: + author: True + description: Assign team PRs to author diff --git a/.github/policies/author-action.yml b/.github/policies/author-action.yml new file mode 100644 index 00000000000..f4953f5efac --- /dev/null +++ b/.github/policies/author-action.yml @@ -0,0 +1,97 @@ +name: GitOps.PullRequestIssueManagement +description: Add and remove needs-author-action label to issues and PRs +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + - payloadType: Issues + - labelAdded: + label: needs-author-action + then: + - addReply: + reply: This issue has been marked `needs-author-action` and may be missing some important information. + description: Needs-author-action notification + - if: + - payloadType: Pull_Request_Review + - not: + activitySenderHasPermission: + permission: Read + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: needs-author-action + description: PR reviews with "changes requested" applies the needs-author-action label + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-author-action + - not: + hasLabel: + label: untriaged + - isOpen + then: + - addLabel: + label: needs-further-triage + - removeLabel: + label: needs-author-action + description: Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue that is not still untriaged + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-author-action + - hasLabel: + label: untriaged + - isOpen + then: + - removeLabel: + label: needs-author-action + description: Remove `needs-author-action` label when the author comments on an `untriaged` issue + - if: + - payloadType: Pull_Request + - isAction: + action: Synchronize + - hasLabel: + label: needs-author-action + then: + - removeLabel: + label: needs-author-action + description: Pushing changes to PR branch removes the needs-author-action label + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - isAction: + action: Created + - hasLabel: + label: needs-author-action + - isOpen + then: + - removeLabel: + label: needs-author-action + description: Author commenting in PR removes the needs-author-action label + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-author-action + - isAction: + action: Submitted + - isOpen + then: + - removeLabel: + label: needs-author-action + description: Author responding to a pull request review comment removes the needs-author-action label diff --git a/.github/policies/community-contrib.yml b/.github/policies/community-contrib.yml new file mode 100644 index 00000000000..655f37b8a61 --- /dev/null +++ b/.github/policies/community-contrib.yml @@ -0,0 +1,49 @@ +name: GitOps.PullRequestIssueManagement +description: Label community PRs +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + - and: + - not: + activitySenderHasPermission: + permission: Admin + - not: + activitySenderHasPermission: + permission: Write + - not: + activitySenderHasPermission: + permission: Write + - not: + isActivitySender: + user: github-actions[bot] + issueAuthor: False + - not: + isActivitySender: + user: dotnet-maestro[bot] + issueAuthor: False + - not: + isActivitySender: + user: dotnet-maestro-bot[bot] + issueAuthor: False + - not: + isActivitySender: + user: dotnet-maestro-bot + issueAuthor: False + - not: + isActivitySender: + user: dotnet-maestro + issueAuthor: False + - not: + isActivitySender: + user: github-actions + issueAuthor: False + then: + - addLabel: + label: community-contribution + description: Label community PRs diff --git a/.github/policies/mention-owners.yml b/.github/policies/mention-owners.yml new file mode 100644 index 00000000000..fde484f2114 --- /dev/null +++ b/.github/policies/mention-owners.yml @@ -0,0 +1,606 @@ +name: GitOps.PullRequestIssueManagement +description: Mention area owners in PRs and issues +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + - or: + - payloadType: Issues + - payloadType: Pull_Request + - labelAdded: + label: area-System.Security + then: + - mentionUsers: + mentionees: + - dotnet/area-system-security + - vcsjones + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + description: Tag security owners + - if: + - or: + - payloadType: Issues + - payloadType: Pull_Request + then: + - if: + - labelAdded: + label: area-System.Security + then: + - mentionUsers: + mentionees: + - dotnet/area-system-security + - vcsjones + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Drawing + then: + - mentionUsers: + mentionees: + - dotnet/area-system-drawing + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Diagnostics.Tracing + then: + - mentionUsers: + mentionees: + - dotnet/area-system-diagnostics-tracing + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Globalization + then: + - mentionUsers: + mentionees: + - dotnet/area-system-globalization + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Linq.Parallel + then: + - mentionUsers: + mentionees: + - dotnet/area-system-linq-parallel + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Resources + then: + - mentionUsers: + mentionees: + - dotnet/area-system-resources + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Text.Encoding + then: + - mentionUsers: + mentionees: + - dotnet/area-system-text-encoding + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Text.Encodings.Web + then: + - mentionUsers: + mentionees: + - dotnet/area-system-text-encodings-web + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Threading.Channels + then: + - mentionUsers: + mentionees: + - dotnet/area-system-threading-channels + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Threading.Tasks + then: + - mentionUsers: + mentionees: + - dotnet/area-system-threading-tasks + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-DependencyModel + then: + - mentionUsers: + mentionees: + - dotnet/area-dependencymodel + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Text.RegularExpressions + then: + - mentionUsers: + mentionees: + - dotnet/area-system-text-regularexpressions + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Collections + then: + - mentionUsers: + mentionees: + - dotnet/area-system-collections + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Linq + then: + - mentionUsers: + mentionees: + - dotnet/area-system-linq + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Numerics.Tensors + then: + - mentionUsers: + mentionees: + - dotnet/area-system-numerics-tensors + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Buffers + then: + - mentionUsers: + mentionees: + - dotnet/area-system-buffers + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Numerics + then: + - mentionUsers: + mentionees: + - dotnet/area-system-numerics + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Runtime.Intrinsics + then: + - mentionUsers: + mentionees: + - dotnet/area-system-runtime-intrinsics + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.CodeDom + then: + - mentionUsers: + mentionees: + - dotnet/area-system-codedom + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Xml + then: + - mentionUsers: + mentionees: + - dotnet/area-system-xml + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Dynamic.Runtime + then: + - mentionUsers: + mentionees: + - cston + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Linq.Expressions + then: + - mentionUsers: + mentionees: + - cston + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Microsoft.CSharp + then: + - mentionUsers: + mentionees: + - cston + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Microsoft.VisualBasic + then: + - mentionUsers: + mentionees: + - cston + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.ComponentModel + then: + - mentionUsers: + mentionees: + - dotnet/area-system-componentmodel + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Configuration + then: + - mentionUsers: + mentionees: + - dotnet/area-system-configuration + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.ComponentModel.Composition + then: + - mentionUsers: + mentionees: + - dotnet/area-system-componentmodel-composition + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Composition + then: + - mentionUsers: + mentionees: + - dotnet/area-system-composition + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Net + then: + - mentionUsers: + mentionees: + - dotnet/ncl + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Net.Http + then: + - mentionUsers: + mentionees: + - dotnet/ncl + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Net.Security + then: + - mentionUsers: + mentionees: + - dotnet/ncl + - vcsjones + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Net.Sockets + then: + - mentionUsers: + mentionees: + - dotnet/ncl + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Diagnostics + then: + - mentionUsers: + mentionees: + - tommcdon + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Data + then: + - mentionUsers: + mentionees: + - roji + - ajcvickers + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Data.OleDB + then: + - mentionUsers: + mentionees: + - roji + - ajcvickers + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Data.Odbc + then: + - mentionUsers: + mentionees: + - roji + - ajcvickers + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Data.SqlClient + then: + - mentionUsers: + mentionees: + - davoudeshtehari + - david-engel + - jrahnama + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.ComponentModel.DataAnnotations + then: + - mentionUsers: + mentionees: + - ajcvickers + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Caching + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-caching + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-DependencyInjection + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-dependencyinjection + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Hosting + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-hosting + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Primitives + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-primitives + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Configuration + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-configuration + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-FileSystem + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-filesystem + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-HttpClientFactory + then: + - mentionUsers: + mentionees: + - dotnet/ncl + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Logging + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-logging + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-Extensions-Options + then: + - mentionUsers: + mentionees: + - dotnet/area-extensions-options + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Net.Quic + then: + - mentionUsers: + mentionees: + - dotnet/ncl + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Formats.Cbor + then: + - mentionUsers: + mentionees: + - dotnet/area-system-formats-cbor + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Formats.Asn1 + then: + - mentionUsers: + mentionees: + - dotnet/area-system-formats-asn1 + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Text.Json + then: + - mentionUsers: + mentionees: + - dotnet/area-system-text-json + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Memory + then: + - mentionUsers: + mentionees: + - dotnet/area-system-memory + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Diagnostics.Activity + then: + - mentionUsers: + mentionees: + - dotnet/area-system-diagnostics-activity + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.IO + then: + - mentionUsers: + mentionees: + - dotnet/area-system-io + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Diagnostics.Process + then: + - mentionUsers: + mentionees: + - dotnet/area-system-diagnostics-process + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.Console + then: + - mentionUsers: + mentionees: + - dotnet/area-system-console + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + - if: + - labelAdded: + label: area-System.IO.Compression + then: + - mentionUsers: + mentionees: + - dotnet/area-system-io-compression + replyTemplate: >- + Tagging subscribers to this area: ${mentionees} + assignMentionees: False + description: Area-owners + diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml deleted file mode 100644 index d721f9ec6e3..00000000000 --- a/.github/policies/resourceManagement.yml +++ /dev/null @@ -1,752 +0,0 @@ -id: -name: GitOps.PullRequestIssueManagement -description: GitOps.PullRequestIssueManagement primitive -owner: -resource: repository -disabled: false -where: -configuration: - resourceManagementConfiguration: - eventResponderTasks: - - if: - - or: - - payloadType: Issues - - payloadType: Pull_Request - - labelAdded: - label: area-System.Security - then: - - mentionUsers: - mentionees: - - dotnet/area-system-security - - vcsjones - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - or: - - payloadType: Issues - - payloadType: Pull_Request - then: - - if: - - labelAdded: - label: area-System.Security - then: - - mentionUsers: - mentionees: - - dotnet/area-system-security - - vcsjones - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Drawing - then: - - mentionUsers: - mentionees: - - dotnet/area-system-drawing - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Diagnostics.Tracing - then: - - mentionUsers: - mentionees: - - dotnet/area-system-diagnostics-tracing - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Globalization - then: - - mentionUsers: - mentionees: - - dotnet/area-system-globalization - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Linq.Parallel - then: - - mentionUsers: - mentionees: - - dotnet/area-system-linq-parallel - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Resources - then: - - mentionUsers: - mentionees: - - dotnet/area-system-resources - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Text.Encoding - then: - - mentionUsers: - mentionees: - - dotnet/area-system-text-encoding - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Text.Encodings.Web - then: - - mentionUsers: - mentionees: - - dotnet/area-system-text-encodings-web - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Threading.Channels - then: - - mentionUsers: - mentionees: - - dotnet/area-system-threading-channels - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Threading.Tasks - then: - - mentionUsers: - mentionees: - - dotnet/area-system-threading-tasks - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-DependencyModel - then: - - mentionUsers: - mentionees: - - dotnet/area-dependencymodel - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Text.RegularExpressions - then: - - mentionUsers: - mentionees: - - dotnet/area-system-text-regularexpressions - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Collections - then: - - mentionUsers: - mentionees: - - dotnet/area-system-collections - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Linq - then: - - mentionUsers: - mentionees: - - dotnet/area-system-linq - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Numerics.Tensors - then: - - mentionUsers: - mentionees: - - dotnet/area-system-numerics-tensors - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Buffers - then: - - mentionUsers: - mentionees: - - dotnet/area-system-buffers - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Numerics - then: - - mentionUsers: - mentionees: - - dotnet/area-system-numerics - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Runtime.Intrinsics - then: - - mentionUsers: - mentionees: - - dotnet/area-system-runtime-intrinsics - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.CodeDom - then: - - mentionUsers: - mentionees: - - dotnet/area-system-codedom - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Xml - then: - - mentionUsers: - mentionees: - - dotnet/area-system-xml - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Dynamic.Runtime - then: - - mentionUsers: - mentionees: - - cston - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Linq.Expressions - then: - - mentionUsers: - mentionees: - - cston - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Microsoft.CSharp - then: - - mentionUsers: - mentionees: - - cston - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Microsoft.VisualBasic - then: - - mentionUsers: - mentionees: - - cston - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.ComponentModel - then: - - mentionUsers: - mentionees: - - dotnet/area-system-componentmodel - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Configuration - then: - - mentionUsers: - mentionees: - - dotnet/area-system-configuration - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.ComponentModel.Composition - then: - - mentionUsers: - mentionees: - - dotnet/area-system-componentmodel-composition - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Composition - then: - - mentionUsers: - mentionees: - - dotnet/area-system-composition - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Net - then: - - mentionUsers: - mentionees: - - dotnet/ncl - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Net.Http - then: - - mentionUsers: - mentionees: - - dotnet/ncl - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Net.Security - then: - - mentionUsers: - mentionees: - - dotnet/ncl - - vcsjones - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Net.Sockets - then: - - mentionUsers: - mentionees: - - dotnet/ncl - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Diagnostics - then: - - mentionUsers: - mentionees: - - tommcdon - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Data - then: - - mentionUsers: - mentionees: - - roji - - ajcvickers - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Data.OleDB - then: - - mentionUsers: - mentionees: - - roji - - ajcvickers - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Data.Odbc - then: - - mentionUsers: - mentionees: - - roji - - ajcvickers - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Data.SqlClient - then: - - mentionUsers: - mentionees: - - davoudeshtehari - - david-engel - - jrahnama - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.ComponentModel.DataAnnotations - then: - - mentionUsers: - mentionees: - - ajcvickers - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Caching - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-caching - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-DependencyInjection - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-dependencyinjection - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Hosting - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-hosting - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Primitives - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-primitives - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Configuration - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-configuration - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-FileSystem - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-filesystem - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-HttpClientFactory - then: - - mentionUsers: - mentionees: - - dotnet/ncl - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Logging - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-logging - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-Extensions-Options - then: - - mentionUsers: - mentionees: - - dotnet/area-extensions-options - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Net.Quic - then: - - mentionUsers: - mentionees: - - dotnet/ncl - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Formats.Cbor - then: - - mentionUsers: - mentionees: - - dotnet/area-system-formats-cbor - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Formats.Asn1 - then: - - mentionUsers: - mentionees: - - dotnet/area-system-formats-asn1 - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Text.Json - then: - - mentionUsers: - mentionees: - - dotnet/area-system-text-json - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Memory - then: - - mentionUsers: - mentionees: - - dotnet/area-system-memory - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Diagnostics.Activity - then: - - mentionUsers: - mentionees: - - dotnet/area-system-diagnostics-activity - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.IO - then: - - mentionUsers: - mentionees: - - dotnet/area-system-io - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Diagnostics.Process - then: - - mentionUsers: - mentionees: - - dotnet/area-system-diagnostics-process - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.Console - then: - - mentionUsers: - mentionees: - - dotnet/area-system-console - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - - if: - - labelAdded: - label: area-System.IO.Compression - then: - - mentionUsers: - mentionees: - - dotnet/area-system-io-compression - replyTemplate: >- - Tagging subscribers to this area: ${mentionees} - assignMentionees: False - description: Area-owners - - if: - - payloadType: Pull_Request - - isAction: - action: Opened - - not: - activitySenderHasPermission: - permission: Read - then: - - assignTo: - author: True - description: Assign Team PRs to author - - if: - - payloadType: Pull_Request - - isAction: - action: Opened - - and: - - not: - activitySenderHasPermission: - permission: Admin - - not: - activitySenderHasPermission: - permission: Write - - not: - activitySenderHasPermission: - permission: Write - - not: - isActivitySender: - user: github-actions[bot] - issueAuthor: False - - not: - isActivitySender: - user: dotnet-maestro[bot] - issueAuthor: False - - not: - isActivitySender: - user: dotnet-maestro-bot[bot] - issueAuthor: False - - not: - isActivitySender: - user: dotnet-maestro-bot - issueAuthor: False - - not: - isActivitySender: - user: dotnet-maestro - issueAuthor: False - - not: - isActivitySender: - user: github-actions - issueAuthor: False - then: - - addLabel: - label: community-contribution - description: Label community PRs - - if: - - payloadType: Issues - - labelAdded: - label: needs-author-action - then: - - addReply: - reply: This issue has been marked `needs-author-action` and may be missing some important information. - description: Needs-author-action notification - - if: - - payloadType: Pull_Request_Review - - not: - activitySenderHasPermission: - permission: Read - - isAction: - action: Submitted - - isReviewState: - reviewState: Changes_requested - then: - - addLabel: - label: needs-author-action - description: PR reviews with "changes requested" applies the needs-author-action label - - if: - - payloadType: Issue_Comment - - isAction: - action: Created - - isActivitySender: - issueAuthor: True - - hasLabel: - label: needs-author-action - - not: - hasLabel: - label: untriaged - - isOpen - then: - - addLabel: - label: needs-further-triage - - removeLabel: - label: needs-author-action - description: Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue that is not still untriaged - - if: - - payloadType: Issue_Comment - - isAction: - action: Created - - isActivitySender: - issueAuthor: True - - hasLabel: - label: needs-author-action - - hasLabel: - label: untriaged - - isOpen - then: - - removeLabel: - label: needs-author-action - description: Remove `needs-author-action` label when the author comments on an `untriaged` issue - - if: - - payloadType: Pull_Request - - isAction: - action: Synchronize - - hasLabel: - label: needs-author-action - then: - - removeLabel: - label: needs-author-action - description: Pushing changes to PR branch removes the needs-author-action label - - if: - - payloadType: Issue_Comment - - isActivitySender: - issueAuthor: True - - isAction: - action: Created - - hasLabel: - label: needs-author-action - - isOpen - then: - - removeLabel: - label: needs-author-action - description: Author commenting in PR removes the needs-author-action label - - if: - - payloadType: Pull_Request_Review - - isActivitySender: - issueAuthor: True - - hasLabel: - label: needs-author-action - - isAction: - action: Submitted - - isOpen - then: - - removeLabel: - label: needs-author-action - description: Author responding to a pull request review comment removes the needs-author-action label -onFailure: -onSuccess: diff --git a/.github/policies/scheduled-pr.yml b/.github/policies/scheduled-pr.yml new file mode 100644 index 00000000000..4bed6f1df55 --- /dev/null +++ b/.github/policies/scheduled-pr.yml @@ -0,0 +1,18 @@ +name: GitOps.PullRequestIssueManagement +description: Schedule a daily PR from main to live +resource: repository + +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: Push to live branch (publish) + frequencies: + - daily + time: 08:0 + filters: [] + actions: + - createPullRequest: + head: main + base: live + title: Merge main into live + body: Please don't squash-merge this PR. diff --git a/.github/policies/scheduledPR.yml b/.github/policies/scheduledPR.yml deleted file mode 100644 index 4ac7b91ea3b..00000000000 --- a/.github/policies/scheduledPR.yml +++ /dev/null @@ -1,34 +0,0 @@ -id: -name: GitOps.PullRequestIssueManagement -description: GitOps.PullRequestIssueManagement primitive -owner: -resource: repository -disabled: false -where: -configuration: - resourceManagementConfiguration: - scheduledSearches: - - description: Push to live branch (publish) - frequencies: - - weekday: - day: Tuesday - time: 08:0 - - weekday: - day: Wednesday - time: 08:0 - - weekday: - day: Thursday - time: 08:0 - - weekday: - day: Friday - time: 08:0 - - weekday: - day: Saturday - time: 08:0 - filters: [] - actions: - - createPullRequest: - head: main - base: live - title: Merge main into live - body: Please don't squash-merge this PR. diff --git a/.github/policies/untriaged.yml b/.github/policies/untriaged-label.yml similarity index 96% rename from .github/policies/untriaged.yml rename to .github/policies/untriaged-label.yml index 778539e1c5a..122c52b7cfe 100644 --- a/.github/policies/untriaged.yml +++ b/.github/policies/untriaged-label.yml @@ -1,10 +1,8 @@ id: untriaged name: GitOps.PullRequestIssueManagement description: Manage the 'untriaged' label on issues -owner: resource: repository -disabled: false -where: + configuration: resourceManagementConfiguration: eventResponderTasks: From 0a6fcc1ed299392f314e5c7f53d5d32487cef356 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:40:46 -0800 Subject: [PATCH 2/3] fix yaml error --- .github/policies/scheduled-pr.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/policies/scheduled-pr.yml b/.github/policies/scheduled-pr.yml index 4bed6f1df55..0abcac5e0e4 100644 --- a/.github/policies/scheduled-pr.yml +++ b/.github/policies/scheduled-pr.yml @@ -4,15 +4,16 @@ resource: repository configuration: resourceManagementConfiguration: - scheduledSearches: - - description: Push to live branch (publish) - frequencies: - - daily + scheduledSearches: + - frequencies: + - daily: time: 08:0 - filters: [] - actions: + filters: [] + actions: - createPullRequest: head: main base: live title: Merge main into live body: Please don't squash-merge this PR. + description: Push to live branch (publish) + From 9fa22eec894de01509fc162cca20c21e840a24fb Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:52:03 -0800 Subject: [PATCH 3/3] fix yaml error --- .github/policies/scheduled-pr.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/policies/scheduled-pr.yml b/.github/policies/scheduled-pr.yml index 0abcac5e0e4..b050d9b4b18 100644 --- a/.github/policies/scheduled-pr.yml +++ b/.github/policies/scheduled-pr.yml @@ -4,16 +4,16 @@ resource: repository configuration: resourceManagementConfiguration: - scheduledSearches: - - frequencies: - - daily: - time: 08:0 - filters: [] - actions: - - createPullRequest: - head: main - base: live - title: Merge main into live - body: Please don't squash-merge this PR. - description: Push to live branch (publish) + scheduledSearches: + - frequencies: + - daily: + time: 08:0 + filters: [] + actions: + - createPullRequest: + head: main + base: live + title: Merge main into live + body: Please don't squash-merge this PR. + description: Push to live branch (publish)