apache / kafka

Mirror of Apache Kafka
Apache License 2.0
28.78k stars 13.95k forks source link

KAFKA-15073 Close stale PRs [2/n] #17166

Closed mumrah closed 1 month ago

mumrah commented 1 month ago

As a follow-up of #13827, this patch will allow the stale Github Action to actually close old PRs.

chia7712 commented 1 month ago

I think leaving 30 days for the contributor to act is an acceptable amount of time. Also they can reopen if they feel the closing was wrong

If we want to address "30 days", the value of "days-before-close" should be "30" rather than "120". see docs: https://github.com/actions/stale?tab=readme-ov-file#days-before-close

Since adding the stale label will alter the last update date, we can calculate the number of days from this date.
mumrah commented 1 month ago

Good catch, @chia7712 👍 -- will adjust accordingly.

jlprat commented 1 month ago

I think leaving 30 days for the contributor to act is an acceptable amount of time. Also they can reopen if they feel the closing was wrong

If we want to address "30 days", the value of "days-before-close" should be "30" rather than "120". see docs: https://github.com/actions/stale?tab=readme-ov-file#days-before-close

Since adding the stale label will alter the last update date, we can calculate the number of days from this date.

Great catch! I understood it as total time. But you are right adding a comment and label will modify the last state for the PR

mumrah commented 1 month ago

Looks like its working as expected.

I did a manual run here https://github.com/apache/kafka/actions/runs/10818124385/job/30013048044

The 25 oldest PRs are now labelled stale https://github.com/apache/kafka/pulls?q=is%3Aopen+label%3Astale+sort%3Acreated-asc