-
Notifications
You must be signed in to change notification settings - Fork 416
feat: add stalebot #1397
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
Merged
+59
−0
Merged
feat: add stalebot #1397
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: Stalebot | ||
|
|
||
| on: | ||
| workflow_dispatch: {} | ||
| schedule: | ||
| # Everyday at 10:00 UTC (05:00 EST / 06:00 EDT) | ||
| - cron: "0 10 * * *" | ||
|
|
||
| env: | ||
| DAYS_BEFORE_ISSUE_STALE: 90 | ||
| DAYS_BEFORE_ISSUE_CLOSE: 90 | ||
| DAYS_BEFORE_PR_STALE: 15 | ||
| DAYS_BEFORE_PR_CLOSE: 5 | ||
|
|
||
| jobs: | ||
| close-stale-issues: | ||
| name: Close Stale Issues | ||
| runs-on: ubuntu-22.04 | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - uses: actions/stale@v9 # https://github.com/actions/stale | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }} | ||
| days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} | ||
| stale-issue-message: > | ||
| This issue has been marked as stale because of no activity in the last ${{ env.DAYS_BEFORE_ISSUE_STALE }} days. | ||
| It will be closed in the next ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days unless it is tagged "no stalebot" or other activity occurs. | ||
| close-issue-message: > | ||
| This issue has been closed due to no activity in the last 12 months. | ||
| stale-issue-label: 'stale' # https://github.com/kagent-dev/kagent/labels/stale | ||
| exempt-issue-labels: 'no stalebot' # https://github.com/kagent-dev/kagent/labels/no%20stalebot | ||
| enable-statistics: true | ||
| operations-per-run: 1000 | ||
| ascending: true # asc means oldest first | ||
|
|
||
| close-stale-prs: | ||
| name: Close Stale PRs | ||
| runs-on: ubuntu-22.04 | ||
| permissions: | ||
| pull-requests: write | ||
EItanya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| issues: write | ||
| steps: | ||
| - uses: actions/stale@v9 # https://github.com/actions/stale | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }} | ||
| days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }} | ||
| stale-pr-message: > | ||
| This pull request has been marked as stale because of no activity in the last ${{ env.DAYS_BEFORE_PR_STALE }} days. | ||
| It will be closed in the next ${{ env.DAYS_BEFORE_PR_CLOSE }} days unless it is tagged "no stalebot" or other activity occurs. | ||
| close-pr-message: > | ||
| This pull request has been closed after ${{ env.DAYS_BEFORE_PR_STALE }} days of inactivity and an additional ${{ env.DAYS_BEFORE_PR_CLOSE }} days after being marked as stale. | ||
| stale-pr-label: 'stale' # https://github.com/kagent-dev/kagent/labels/stale | ||
| exempt-pr-labels: 'no stalebot' # https://github.com/kagent-dev/kagent/labels/no%20stalebot | ||
| enable-statistics: true | ||
| operations-per-run: 1000 | ||
| ascending: true # asc means oldest first | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close-issue-messagesays issues are closed after "no activity in the last 12 months", but the configured timings areDAYS_BEFORE_ISSUE_STALE=90andDAYS_BEFORE_ISSUE_CLOSE=90(i.e., close after ~180 days of inactivity). Please update the message (or the thresholds) so the user-facing text matches actual behavior.