diff --git a/.github/policies/labelManagement.issueUpdated.yml b/.github/policies/labelManagement.issueUpdated.yml new file mode 100644 index 00000000..1f6b19c2 --- /dev/null +++ b/.github/policies/labelManagement.issueUpdated.yml @@ -0,0 +1,49 @@ +id: labelManagement.issueUpdated +name: GitOps.PullRequestIssueManagement +description: >- + Handlers for when an issue is updated and not closed + This primarily includes handlers for comments, reviews, and re-runs +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Clean email replies on every comment + if: + - or: + - payloadType: Issue_Comment + - payloadType: Pull_Request_Review_Comment + then: + - cleanEmailReply + - description: >- + If an author responds to an issue which needs author feedback + * Remove the Needs-Author-Feedback Label + if: + - or: + - payloadType: Pull_Request_Review + - payloadType: Pull_Request_Review_Comment + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author-Feedback + - not: + isAction: + action: Synchronize + then: + - removeLabel: + label: Needs-Author-Feedback + - description: Sync labels from issues on all pull request events + if: + - payloadType: Pull_Request + then: + - labelSync: + pattern: Issue- + - labelSync: + pattern: Area- + - inPrLabel: + label: In-PR +onFailure: +onSuccess: