Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

approvers: add commenter that marks stale PRs #3655

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ larger set of contributors to apply/remove them.
| <a id="do-not-merge/release-note-label-needed" href="#do-not-merge/release-note-label-needed">`do-not-merge/release-note-label-needed`</a> | Indicates that a PR should not merge because it's missing one of the release note labels. <br><br> This was previously `needs/release-note`, | prow | [release-note](https://prow.ci.kubevirt.io/command-help#release-note) |
| <a id="do-not-merge/work-in-progress" href="#do-not-merge/work-in-progress">`do-not-merge/work-in-progress`</a> | Indicates that a PR should not merge because it is a work in progress.| prow | [wip](https://prow.ci.kubevirt.io/command-help#wip) |
| <a id="lgtm" href="#lgtm">`lgtm`</a> | Indicates that a PR is ready to be merged.| reviewers or members | [lgtm](https://prow.ci.kubevirt.io/command-help#lgtm) |
| <a id="needs-approver-review" href="#needs-approver-review">`needs-approver-review`</a> | Indicates that a PR requires a review from an approver.| prow | [label](https://prow.ci.kubevirt.io/command-help#label) |
| <a id="needs-ok-to-test" href="#needs-ok-to-test">`needs-ok-to-test`</a> | Indicates a PR that requires an org member to verify it is safe to test.| prow | [trigger](https://prow.ci.kubevirt.io/command-help#trigger) |
| <a id="needs-rebase" href="#needs-rebase">`needs-rebase`</a> | Indicates a PR cannot be merged because it has merge conflicts with HEAD.| prow | [needs-rebase](https://prow.ci.kubevirt.io/command-help#needs-rebase) |
| <a id="ok-to-test" href="#ok-to-test">`ok-to-test`</a> | Indicates a non-member PR verified by an org member that is safe to test.| prow | [trigger](https://prow.ci.kubevirt.io/command-help#trigger) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,41 @@ periodics:
- --template
- --ceiling=10
- --confirm
- name: periodic-project-infra-needs-approver-review
interval: 1h
annotations:
testgrid-create-test-group: "false"
labels:
preset-github-credentials: "true"
decorate: true
cluster: kubevirt-prow-control-plane
spec:
containers:
- image: gcr.io/k8s-staging-test-infra/commenter:v20240801-a5d9345e59
command:
- /ko-app/commenter
args:
- |-
--query=org:kubevirt
is:open
is:pr
label:lgtm
-label:approved
-label:do-not-merge/work-in-progress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also add -label:do-not-merge/hold?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there might be cases where we don't want to exclude PRs that have a hold - i.e. this PR would still require reviewer attention, while it has an LGTM: kubevirt/community#297

(might be a special case though)

source query

-label:needs/approver-review
is:public
- --updated=168h
- --token=/etc/github/oauth
- |-
--comment=Pull requests that are marked with `lgtm` should receive a review
from an approver within 1 week.

After that period the bot marks them with the label `needs-approver-review`.

/label needs-approver-review
- --template
- --ceiling=10
- --confirm
- name: periodic-project-infra-autoowners
interval: 24h
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ default:
target: prs
prowPlugin: lgtm
addedBy: reviewers or members
- color: b60205
description: Indicates that a PR requires a review from an approver.
name: needs-approver-review
target: prs
prowPlugin: label
addedBy: prow
- color: 0ffa16
description: Indicates a PR has been approved by an approver from all required OWNERS files.
name: approved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ override:
label:
restricted_labels:
'kubevirt':
- allowed_users:
- kubevirt-bot
label: needs-approver-review
- allowed_teams:
- kubevirtorg-label
label: good-first-issue
Expand Down