+1, sounds like a good idea to clean up stale PRs.

-Jack

On Wed, Jan 3, 2024 at 9:52 AM Russell Spitzer <[email protected]>
wrote:

> I definitely need something to keep emailing me, so I support this.
>
> On Wed, Jan 3, 2024 at 7:52 AM Jean-Baptiste Onofré <[email protected]>
> wrote:
>
>> Hi guys,
>>
>> We have several examples where  we have some kind of "stale" PRs,
>> either because we are waiting for a review, or we are waiting for
>> changes from the contributor.
>>
>> We are already using two jobs around issues/PRs:
>> - labeler to label PRs depending of the Iceberg modules change scope
>> - stale to stale/close issues (we don't touch PRs in stale job today)
>>
>> In order to "improve" the PRs flow, I would like to propose the following:
>>
>> 1. We keep our labeler as it is. I propose to add
>> .github/reviewers.yml to automatically add reviewers depending on the
>> labels. It would look like (this is just an example, I will do a more
>> concrete setup in a PR if there are no objection):
>>
>> labels:
>>   - name: API
>>     reviewers:
>>       - rdblue
>>       - aokolnychyi
>>       - Fokko
>>     exclusionList: []
>>   - name: CORE
>>     reviewers:
>>       - rdblue
>>       - Fokko
>>       - nastra
>>     exclusionList: []
>>   - name: FLINK
>>     reviewers:
>>       - nastra
>>     exclusionList: []
>>    ...
>>   fallbackReviewers:
>>     - rdblue
>>     - Fokko
>>     - nastra
>>     - jbonofre
>>
>> 2. We can update the stale job to add a reminder message to
>> reviewer/contributor on PR. For instance, something like:
>>
>> name: Mark and close stale issues and pull requests
>>
>> on:
>>   schedule:
>>   - cron: '0 0 * * *'
>>   workflow_dispatch:
>>
>> permissions: read-all
>> jobs:
>>   stale:
>>     runs-on: ubuntu-latest
>>     permissions:
>>       issues: write
>>       pull-requests: write
>>     steps:
>>     - uses: actions/stale@v9
>>       with:
>>           stale-issue-label: 'stale'
>>           exempt-issue-labels: 'not-stale'
>>           days-before-issue-stale: 180
>>           days-before-issue-close: 14
>>           stale-issue-message: >
>>             This issue has been automatically marked as stale because
>> it has been open for 180 days
>>             with no activity. It will be closed in the next 14 days if
>> no further activity occurs. To
>>             permanently prevent this issue from being considered
>> stale, add the label 'not-stale',
>>             but commenting on the issue is preferred when possible.
>>           close-issue-message: >
>>             This issue has been closed because it has not received any
>> activity in the last 14 days
>>             since being marked as 'stale'
>>           stale-pr-message: 'This pull request has been marked as
>> stale due to 15 days of inactivity. It will be closed in 1 week if no
>> further activity occurs. If you think that’s incorrect or this pull
>> request requires a review, please simply write any comment. If closed,
>> you can revive the PR at any time and @mention a reviewer or discuss
>> it on the [email protected] list. Thank you for your
>> contributions.'
>>           close-pr-message: 'This pull request has been closed due to
>> lack of activity. If you think that is incorrect, or the pull request
>> requires review, you can revive the PR at any time.'
>>         stale-pr-label: 'stale'
>>         days-before-pr-stale: 15
>>         days-before-pr-close: 7
>>         exempt-pr-labels: "pinned,security"
>>         operations-per-run: 100
>>
>> Thoughts ?
>>
>> PS: I did set up this on Apache Beam for example, and we did speed up
>> the review and PR flows.
>>
>> Regards
>> JB
>>
>

Reply via email to