Skip to content

Commit

Permalink
Add Resource Management Policy
Browse files Browse the repository at this point in the history
  • Loading branch information
castrodd committed Nov 16, 2023
1 parent ca91f6a commit 7710d42
Showing 1 changed file with 222 additions and 0 deletions.
222 changes: 222 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: needs-author feedback
- hasLabel:
label: no recent activity
- noActivitySince:
days: 7
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: needs-author feedback
- noActivitySince:
days: 5
- 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 **5 days**. It will be closed if no further activity occurs **within 2 days of this comment**.
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: duplicate
- noActivitySince:
days: 3
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes.
- closeIssue
- description:
frequencies:
- hourly:
hour: 3
filters:
- isPullRequest
- isOpen
- hasLabel:
label: needs-author feedback
- hasLabel:
label: no recent activity
- noActivitySince:
days: 7
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 3
filters:
- isPullRequest
- isOpen
- hasLabel:
label: needs-author feedback
- noActivitySince:
days: 7
- isNotLabeledWith:
label: no recent activity
actions:
- addLabel:
label: 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: no recent activity
then:
- removeLabel:
label: no recent activity
description:
- if:
- payloadType: Issues
- isAction:
action: Closed
- hasLabel:
label: needs-triage (functions)
then:
- removeLabel:
label: needs-triage (functions)
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: no recent activity
then:
- removeLabel:
label: 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: 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: Pull_Request_Review
- hasLabel:
label: no recent activity
then:
- removeLabel:
label: no recent activity
description:
- if:
- payloadType: Pull_Request
- hasLabel:
label: auto merge
then:
- enableAutoMerge:
mergeMethod: Squash
description:
- if:
- payloadType: Pull_Request
- labelRemoved:
label: auto merge
then:
- disableAutoMerge
description:
onFailure:
onSuccess:

0 comments on commit 7710d42

Please sign in to comment.