|
| 1 | +name: GitOps.PullRequestIssueManagement |
| 2 | +description: Add and remove needs-author-action label to issues and PRs |
| 3 | +resource: repository |
| 4 | + |
| 5 | +configuration: |
| 6 | + resourceManagementConfiguration: |
| 7 | + eventResponderTasks: |
| 8 | + - if: |
| 9 | + - payloadType: Issues |
| 10 | + - labelAdded: |
| 11 | + label: needs-author-action |
| 12 | + then: |
| 13 | + - addReply: |
| 14 | + reply: This issue has been marked `needs-author-action` and may be missing some important information. |
| 15 | + description: Needs-author-action notification |
| 16 | + - if: |
| 17 | + - payloadType: Pull_Request_Review |
| 18 | + - not: |
| 19 | + activitySenderHasPermission: |
| 20 | + permission: Read |
| 21 | + - isAction: |
| 22 | + action: Submitted |
| 23 | + - isReviewState: |
| 24 | + reviewState: Changes_requested |
| 25 | + then: |
| 26 | + - addLabel: |
| 27 | + label: needs-author-action |
| 28 | + description: PR reviews with "changes requested" applies the needs-author-action label |
| 29 | + - if: |
| 30 | + - payloadType: Issue_Comment |
| 31 | + - isAction: |
| 32 | + action: Created |
| 33 | + - isActivitySender: |
| 34 | + issueAuthor: True |
| 35 | + - hasLabel: |
| 36 | + label: needs-author-action |
| 37 | + - not: |
| 38 | + hasLabel: |
| 39 | + label: untriaged |
| 40 | + - isOpen |
| 41 | + then: |
| 42 | + - addLabel: |
| 43 | + label: needs-further-triage |
| 44 | + - removeLabel: |
| 45 | + label: needs-author-action |
| 46 | + description: Replace `needs-author-action` label with `needs-further-triage` label when the author comments on an issue that is not still untriaged |
| 47 | + - if: |
| 48 | + - payloadType: Issue_Comment |
| 49 | + - isAction: |
| 50 | + action: Created |
| 51 | + - isActivitySender: |
| 52 | + issueAuthor: True |
| 53 | + - hasLabel: |
| 54 | + label: needs-author-action |
| 55 | + - hasLabel: |
| 56 | + label: untriaged |
| 57 | + - isOpen |
| 58 | + then: |
| 59 | + - removeLabel: |
| 60 | + label: needs-author-action |
| 61 | + description: Remove `needs-author-action` label when the author comments on an `untriaged` issue |
| 62 | + - if: |
| 63 | + - payloadType: Pull_Request |
| 64 | + - isAction: |
| 65 | + action: Synchronize |
| 66 | + - hasLabel: |
| 67 | + label: needs-author-action |
| 68 | + then: |
| 69 | + - removeLabel: |
| 70 | + label: needs-author-action |
| 71 | + description: Pushing changes to PR branch removes the needs-author-action label |
| 72 | + - if: |
| 73 | + - payloadType: Issue_Comment |
| 74 | + - isActivitySender: |
| 75 | + issueAuthor: True |
| 76 | + - isAction: |
| 77 | + action: Created |
| 78 | + - hasLabel: |
| 79 | + label: needs-author-action |
| 80 | + - isOpen |
| 81 | + then: |
| 82 | + - removeLabel: |
| 83 | + label: needs-author-action |
| 84 | + description: Author commenting in PR removes the needs-author-action label |
| 85 | + - if: |
| 86 | + - payloadType: Pull_Request_Review |
| 87 | + - isActivitySender: |
| 88 | + issueAuthor: True |
| 89 | + - hasLabel: |
| 90 | + label: needs-author-action |
| 91 | + - isAction: |
| 92 | + action: Submitted |
| 93 | + - isOpen |
| 94 | + then: |
| 95 | + - removeLabel: |
| 96 | + label: needs-author-action |
| 97 | + description: Author responding to a pull request review comment removes the needs-author-action label |
0 commit comments