Skip to content

Commit

Permalink
ci: adds policies bot configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Jul 17, 2024
1 parent 3489e49 commit b4b312d
Showing 1 changed file with 34 additions and 70 deletions.
104 changes: 34 additions & 70 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
id:
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
owner:
resource: repository
disabled: false
where:
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
- description:
frequencies:
- hourly:
hour: 1
Expand All @@ -18,14 +18,14 @@ configuration:
- hasLabel:
label: 'status:waiting-for-author-feedback'
- hasLabel:
label: 'Status: No Recent Activity'
label: no-recent-activity
- noActivitySince:
days: 3
- isNotLabeledWith:
label: Service Bug
label: service issue
actions:
- closeIssue
- description:
- description:
frequencies:
- hourly:
hour: 1
Expand All @@ -37,15 +37,13 @@ configuration:
- noActivitySince:
days: 4
- isNotLabeledWith:
label: 'Status: No Recent Activity'
- isNotLabeledWith:
label: Service Bug
label: no-recent-activity
actions:
- addLabel:
label: 'Status: No Recent Activity'
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:
- description:
frequencies:
- hourly:
hour: 1
Expand All @@ -60,28 +58,6 @@ configuration:
- 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: 1
filters:
- isOpen
- hasLabel:
label: 'API: Graph'
- noActivitySince:
days: 14
actions:
- addLabel:
label: Service issue
- addReply:
reply: >-
Hello @${issueAuthor}
Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage.
https://aka.ms/askgraph
eventResponderTasks:
- if:
- payloadType: Issues
Expand All @@ -93,17 +69,6 @@ configuration:
- removeLabel:
label: 'status:waiting-for-author-feedback'
description:
- if:
- payloadType: Issues
- and:
- isOpen
- not:
and:
- isAssignedToSomeone
- isLabeled
then:
- addLabel:
label: 'ToTriage'
- if:
- payloadType: Issue_Comment
- isAction:
Expand All @@ -114,21 +79,29 @@ configuration:
label: 'status:waiting-for-author-feedback'
then:
- addLabel:
label: "Needs: Attention \U0001F44B"
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'status:waiting-for-author-feedback'
description:
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: 'Status: No Recent Activity'
label: no-recent-activity
then:
- removeLabel:
label: 'Status: No Recent Activity'
description:
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:
Expand All @@ -142,25 +115,16 @@ configuration:
then:
- addLabel:
label: 'status:waiting-for-author-feedback'
description:
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'API: Graph'
- payloadType: Issues
- or:
- isAssignedToSomeone
- isAction:
action: Closed
then:
- addReply:
reply: >-
Hello @${issueAuthor}
Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage.
https://aka.ms/askgraph
This issue will now be closed. If you encounter any issues in the future, please feel free to open an issue.
- addLabel:
label: Service issue
- closeIssue
description:
onFailure:
onSuccess:
- removeLabel:
label: ToTriage
description:
onFailure:
onSuccess:

0 comments on commit b4b312d

Please sign in to comment.