Skip to content

Commit

Permalink
Merge pull request #222 from microsoftgraph/feature/policies-bot
Browse files Browse the repository at this point in the history
ci: adds policies bot configuration
  • Loading branch information
baywet authored Jul 18, 2024
2 parents 483b288 + 2476d65 commit c0f647f
Showing 1 changed file with 130 additions and 0 deletions.
130 changes: 130 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
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: 'status:waiting-for-author-feedback'
- hasLabel:
label: no-recent-activity
- noActivitySince:
days: 3
- isNotLabeledWith:
label: service issue
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 1
filters:
- isIssue
- isOpen
- hasLabel:
label: 'status:waiting-for-author-feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: no-recent-activity
actions:
- addLabel:
label: 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
eventResponderTasks:
- if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: 'status:waiting-for-author-feedback'
then:
- removeLabel:
label: 'status:waiting-for-author-feedback'
description:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'status:waiting-for-author-feedback'
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'status:waiting-for-author-feedback'
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: no-recent-activity
then:
- removeLabel:
label: no-recent-activity
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: no-recent-activity
then:
- removeLabel:
label: no-recent-activity
description:
- if:
- payloadType: Issue_Comment
- activitySenderHasAssociation:
association: Contributor
- bodyContains:
pattern: '?'
isRegex: False
- bodyContains:
pattern: '@'
isRegex: False
then:
- addLabel:
label: 'status:waiting-for-author-feedback'
description:
- if:
- payloadType: Issues
- or:
- isAssignedToSomeone
- isAction:
action: Closed
then:
- removeLabel:
label: ToTriage
description:
onFailure:
onSuccess:

0 comments on commit c0f647f

Please sign in to comment.