diff --git a/.github/policies/issues.needs-info.yml b/.github/policies/issues.needs-info.yml index e4bc9df974..3342d1193e 100644 --- a/.github/policies/issues.needs-info.yml +++ b/.github/policies/issues.needs-info.yml @@ -51,8 +51,8 @@ configuration: label: needs-info - isOpen then: - - assignTo: - users: [] + - unassign: + author: true - addLabel: label: needs-area - removeLabel: diff --git a/.github/policies/pr.stale.yml b/.github/policies/pr.stale.yml index 5da6b43818..1a160605d1 100644 --- a/.github/policies/pr.stale.yml +++ b/.github/policies/pr.stale.yml @@ -25,7 +25,8 @@ configuration: - addReply: reply: >- Hi @${issueAuthor}. - Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 days, the PR will automatically be closed. If you want to refresh the PR, please remove the `stale` label. + Your PR has had no update for 14 days and it is marked as a stale PR. If it is not updated within 14 days, the PR will automatically be closed. + The `stale` label is removed automatically when you update or comment on your PR, or when a maintainer reviews it. You can also remove the label manually. - description: Close prs that have not been updated in 28 days frequencies: @@ -45,5 +46,63 @@ configuration: Hi @${issueAuthor}. This PR will be closed since it has had no update for 28 days. If this change is still relevant, please reopen the PR. + eventResponderTasks: + - description: Remove the stale label when the PR author updates the PR + if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: true + - not: + labelAdded: + label: stale + - hasLabel: + label: stale + - isOpen + then: + - removeLabel: + label: stale + + - description: Remove the stale label when the PR author comments + if: + - payloadType: Issue_Comment + - isPullRequest + - isAction: + action: Created + - isActivitySender: + issueAuthor: true + - hasLabel: + label: stale + - isOpen + then: + - removeLabel: + label: stale + + - description: Remove the stale label when the PR author or a maintainer reviews the PR + if: + - or: + - and: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - and: + - payloadType: Pull_Request_Review_Comment + - isAction: + action: Created + - or: + - isActivitySender: + issueAuthor: true + - activitySenderHasAssociation: + association: Owner + - activitySenderHasAssociation: + association: Member + - activitySenderHasAssociation: + association: Collaborator + - hasLabel: + label: stale + - isOpen + then: + - removeLabel: + label: stale + onFailure: onSuccess: