Skip to content

Commit

Permalink
Moving to own file.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengillie authored Jan 27, 2025
1 parent d8be02a commit 565bd00
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
41 changes: 41 additions & 0 deletions .github/policies/labelAdded.validationDefenderError.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
id: labelAdded.validationDefenderError
name: GitOps.PullRequestIssueManagement
description: Handlers when "Validation-Defender-Error" label is added
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: >-
When the label "Validation-Defender-Error" is added to a pull request
* Add the PR specific reply notifying the issue author
* Close the PR
if:
- payloadType: Pull_Request
- labelAdded:
label: Validation-Defender-Error
then:
- addReply:
reply: >-
Hello @${issueAuthor},
The package manager bot was blocked from installing one of the installers listed in the url field, and cannot continue.
The application included in this pull request failed to pass the [Installers Scan](https://docs.microsoft.com/en-us/windows/package-manager/package/winget-validation) test. This test is designed to ensure that the application installs on all environments without warnings. For more details on this error, see [Defender errors](https://learn.microsoft.com/en-us/windows/package-manager/package/repository#error-labels). Please check to ensure the installer URL is correct and update the URL and the Hash if a change is made.
Template: msftbot/validationError/installers/validationDefender
- assignTo:
author: True
- addLabel:
label: Needs-Author-Feedback
- removeLabel:
label: Needs-Attention # This will automatically assign the ICM Users
# The policy service should trigger even when the label was added by the policy service
triggerOnOwnActions: true
onFailure:
onSuccess:
8 changes: 0 additions & 8 deletions .github/policies/wingetbotTriggers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ configuration:
label: Needs-Attention # This will automatically assign the ICM Users
- removeLabel:
label: Needs-Author-Feedback
- description: Close PRs when "Validation-Defender-Error" label is added
if:
- payloadType: Pull_Request
- isOpen
- labelAdded:
label: Validation-Defender-Error
then:
- closeIssue
# The policy service should trigger even when the assignment was made by the policy service
triggerOnOwnActions: true
onFailure:
Expand Down

0 comments on commit 565bd00

Please sign in to comment.