Skip to content

Commit

Permalink
Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagemen…
Browse files Browse the repository at this point in the history
…t as FabricBot replacement

Owners of the FabricBot configuration should have received email notification. The same information contained in the email is published internally at: https://aka.ms/gim/fabricbot. Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html

Please review and merge this PR to complete the process of onboarding to the new service.
  • Loading branch information
1 parent fb2084d commit 0c71d62
Showing 1 changed file with 214 additions and 0 deletions.
214 changes: 214 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
frequencies:
- hourly:
hour: 1
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'Status: No recent activity'
- noActivitySince:
days: 3
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 1
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: 'Status: No recent activity'
actions:
- addLabel:
label: 'Status: No recent activity'
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
- description:
frequencies:
- hourly:
hour: 1
filters:
- isIssue
- isOpen
- hasLabel:
label: duplicate
- noActivitySince:
days: 1
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isPullRequest
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'Status: No recent activity'
- noActivitySince:
days: 7
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isPullRequest
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 7
- isNotLabeledWith:
label: 'Status: No recent activity'
actions:
- addLabel:
label: 'Status: No recent activity'
- addReply:
reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**.
eventResponderTasks:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: 'Status: No recent activity'
then:
- removeLabel:
label: 'Status: No recent activity'
description:
- if:
- payloadType: Issues
- or:
- isAssignedToSomeone
- isAction:
action: Closed
then:
- removeLabel:
label: 'Needs: Triage'
description:
- if:
- payloadType: Pull_Request
- isAction:
action: Opened
then:
- addCodeFlowLink
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'Status: No recent activity'
then:
- removeLabel:
label: 'Status: No recent activity'
description:
- if:
- payloadType: Pull_Request_Review
- isAction:
action: Submitted
- isReviewState:
reviewState: Changes_requested
then:
- addLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Pull_Request
- isActivitySender:
issueAuthor: True
- not:
isAction:
action: Closed
- hasLabel:
label: 'Needs: Author Feedback'
then:
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Issue_Comment
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
then:
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Pull_Request_Review
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
then:
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Pull_Request
- not:
isAction:
action: Closed
- hasLabel:
label: 'Status: No recent activity'
then:
- removeLabel:
label: 'Status: No recent activity'
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'Status: No recent activity'
then:
- removeLabel:
label: 'Status: No recent activity'
description:
- if:
- payloadType: Pull_Request_Review
- hasLabel:
label: 'Status: No recent activity'
then:
- removeLabel:
label: 'Status: No recent activity'
description:
onFailure:
onSuccess:

0 comments on commit 0c71d62

Please sign in to comment.