Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update resourceManagement to include event responder flows #4531

Merged
merged 7 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update resourceManagement to include event responder flows
  • Loading branch information
hoyosjs authored Feb 28, 2024
commit c4836082ba5e850fb0c77bd8358fe2d48576113b
91 changes: 90 additions & 1 deletion .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,95 @@
- addReply:
reply: This issue has been resolved and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
eventResponderTasks: []
eventResponderTasks:
- description: Auto approve dependencies
if:
- payloadType: Pull_Request
- isPullRequest
- isAction:
action: Opened
- titleContains:
pattern: Update dependencies
isRegex: False
- isActivitySender:
user: dotnet-maestro[bot]
issueAuthor: False
then:
- approvePullRequest:
comment: Automatically approving dependency update.
triggerOnOwnActions: false
- description: '[Idle Issue Management] Replace needs author feedback label with needs attention label when the author comments on an issue'
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- hasLabel:
label: 'Needs: Author Feedback'
- isIssue
- isOpen
- isActivitySender:
issueAuthor: True
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
triggerOnOwnActions: false
- description: '[Idle Issue Management] Reopen issues with author feedback within 30 days of closure'
if:
- payloadType: Issue_Comment

Check failure on line 123 in .github/policies/resourceManagement.yml

View check run for this annotation

Dotnet Policy Service / GitOps/YmlValidation

.github/policies/resourceManagement.yml#L123

Exception during deserialization. Unknown condition specified.
- isAction:
action: Created
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'Status: No Recent Activity'
- isIssue
- not:
isClosed
- isUnlocked
- isActivitySender:
issueAuthor: True
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Status: No Recent Activity'
- removeLabel:
label: 'Needs: Author Feedback'
- reopenIssue
triggerOnOwnActions: false
- description: '[Idle Issue Management] Remove no recent activity label when an issue is commented on'
if:
- payloadType: Issues
- not:
isAction:
action: Closed
- isIssue
- hasLabel:
label: 'Status: No Recent Activity'
then:
- removeLabel:
label: 'Status: No Recent Activity'
triggerOnOwnActions: false
- if:
- payloadType: Issue_Comment
- isIssue
- hasLabel:
label: 'Status: No Recent Activity'
then:
- removeLabel:
label: 'Status: No Recent Activity'
triggerOnOwnActions: false
- if:
- payloadType: Issues
- isIssue
- labelAdded:
label: 'Needs: Author Feedback'
then:
- addReply:
reply: 'Hi @${issueAuthor}. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.'
description: Add comment when 'Needs Author Feedback' is applied to issue
triggerOnOwnActions: false
onFailure:
onSuccess: