2022-03-02 20:03:56 +00:00
|
|
|
# Configuration for stale action workflow - https://github.com/actions/stale
|
|
|
|
|
|
|
|
name: 'Close stale issues and PRs'
|
|
|
|
on:
|
|
|
|
schedule:
|
2022-07-07 17:15:10 +00:00
|
|
|
- cron: '0 * * * *'
|
2022-03-02 20:03:56 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
stale:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-22 23:43:17 +00:00
|
|
|
- uses: actions/stale@v9
|
2022-03-02 20:03:56 +00:00
|
|
|
with:
|
|
|
|
# PAT for GitHub API authentication
|
|
|
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
|
|
|
|
# Comment on the staled PRs
|
|
|
|
stale-pr-message: >
|
|
|
|
This pull request has been automatically marked as stale because it
|
|
|
|
has not had any activity for 60 days. It will be closed if no further
|
|
|
|
activity occurs for another 30 days.
|
|
|
|
|
|
|
|
If you are a maintainer or core committer, please follow-up on this
|
|
|
|
pull request to identify what steps should be taken by the author to move this
|
|
|
|
proposed change forward.
|
|
|
|
|
|
|
|
If you are the author of this pull request, thank you for your proposed
|
|
|
|
contribution. If you believe this change is still appropriate, please
|
|
|
|
ensure that any feedback has been addressed and ask for a code review.
|
|
|
|
|
|
|
|
# Comment on the staled PRs while closed
|
|
|
|
close-pr-message: >
|
|
|
|
This pull request has been automatically closed because there has
|
|
|
|
been no activity for 90 days. Please feel free to reopen this pull
|
|
|
|
request (or open a new one) if the proposed change is still
|
|
|
|
appropriate. Thank you for your contribution!
|
|
|
|
|
|
|
|
# Idle number of days before making PRs stale (exempts Issues)
|
|
|
|
days-before-pr-stale: 60
|
|
|
|
|
|
|
|
# Idle number of days before closing stale PRs (exempts Issues)
|
2022-10-28 18:24:33 +00:00
|
|
|
days-before-pr-close: 30
|
2022-03-02 20:03:56 +00:00
|
|
|
|
|
|
|
# Label to apply on staled PRs
|
|
|
|
stale-pr-label: 'stale'
|
|
|
|
|
|
|
|
# Labels on PRs exempted from stale
|
|
|
|
exempt-pr-labels: 'pinned,security'
|
|
|
|
|
|
|
|
# Exempt all PRs with milestones from stale (also exempts Issues)
|
|
|
|
exempt-all-pr-milestones: true
|
|
|
|
|
|
|
|
# Max number of operations per run
|
.github/workflows: increase operations-per-run to 100 in stale bot
The stale bot's `operations-per-run`
(https://github.com/actions/stale#operations-per-run) corresponds to the max
number of API calls it is allowed to make per hour. Currently,
`operations-per-run` is set to 30, which means that the stale bot
can make up to 30 API calls per hour.
With this limit in place, the stale bot is only able to process 400 PRs at a time.
Since there are 900+ PRs in the Ceph repository, we should increase the number of
operations to cover them all. This needs to be done with care though, since GitHub
has a rate limit
(https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting)
depending on business plan.
According to GitHub's documentation on GitHub action requests
(https://docs.github.com/en/rest/overview/resources-in-the-rest-api#requests-from-github-actions),
the rate limit is 1,000 requests per hour per repository when using `GITHUB_TOKEN` (which we are).
For enterprise accounts, GitHub Enterprise Cloud's rate limit applies, and the limit is 15,000
requests per hour per repository.
Based on this information, we should be fine to increase the max `operations-per-run`
to 100. This would cover a little over 1000 PRs, which should be enough
to process the 900-some-odd PRs in the Ceph repository.
Signed-off-by: Laura Flores <lflores@redhat.com>
2022-08-05 16:34:20 +00:00
|
|
|
operations-per-run: 100
|
2022-07-06 15:10:45 +00:00
|
|
|
|
|
|
|
# Change the order used to fetch the issues and pull requests from GitHub
|
|
|
|
# So we now start with the oldest PRs and work our way backwards
|
|
|
|
ascending: true
|