microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
.github/policies/issues.needs-info.yml
61lines · modecode
| 1 | id: issues.inactivity |
| 2 | name: GitOps.PullRequestIssueManagement |
| 3 | description: Manage issues that need author response |
| 4 | owner: |
| 5 | resource: repository |
| 6 | disabled: false |
| 7 | where: |
| 8 | configuration: |
| 9 | resourceManagementConfiguration: |
| 10 | scheduledSearches: |
| 11 | - description: Close issues needing author feedback that have been stale for 14 days |
| 12 | frequencies: |
| 13 | - hourly: |
| 14 | hour: 6 |
| 15 | filters: |
| 16 | - isIssue |
| 17 | - isOpen |
| 18 | - hasLabel: |
| 19 | label: needs-info |
| 20 | - noActivitySince: |
| 21 | days: 14 |
| 22 | actions: |
| 23 | - closeIssue |
| 24 | - addReply: |
| 25 | reply: >- |
| 26 | Hi @${issueAuthor}. |
| 27 | Since there hasn't been recent engagement, we're going to close this out. |
| 28 | Please feel free to reopen if you have any further questions or concerns. |
| 29 | |
| 30 | eventResponderTasks: |
| 31 | - description: When the label "needs-info" is added to an issue assign back to the author |
| 32 | if: |
| 33 | - payloadType: Issues |
| 34 | - labelAdded: |
| 35 | label: needs-info |
| 36 | - isOpen |
| 37 | then: |
| 38 | - assignTo: |
| 39 | author: true |
| 40 | # The policy service should trigger even when the label was added by the policy service |
| 41 | triggerOnOwnActions: true |
| 42 | |
| 43 | - description: Remove needs-info label when author comments on issue |
| 44 | if: |
| 45 | - payloadType: Issue_Comment |
| 46 | - isAction: |
| 47 | action: Created |
| 48 | - isActivitySender: |
| 49 | issueAuthor: True |
| 50 | - hasLabel: |
| 51 | label: needs-info |
| 52 | - isOpen |
| 53 | then: |
| 54 | - assignTo: |
| 55 | users: [] |
| 56 | - addLabel: |
| 57 | label: needs-area |
| 58 | - removeLabel: |
| 59 | label: needs-info |
| 60 | onFailure: |
| 61 | onSuccess: |
| 62 | |