-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up GitHub Actions to automatically close and lock issues (#1920)
* add workflow to close inactive issues * add workflow to lock closed issues
- Loading branch information
1 parent
68a0a90
commit b8aad0e
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,37 @@ | ||
# This workflow is based on a very similar one from Flutter | ||
# https://github.com/flutter/flutter/blob/3.16.0/.github/workflows/no-response.yaml | ||
|
||
name: close inactive issues | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
schedule: | ||
- cron: '0 * * * *' | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'leancodepl/patrol' }} | ||
steps: | ||
- uses: godofredoc/no-response@0ce2dc0e63e1c7d2b87752ceed091f6d32c9df09 | ||
with: | ||
token: ${{ github.token }} | ||
closeComment: > | ||
Without additional information, we can't resolve this issue. We're | ||
therefore reluctantly going to close it. | ||
Feel free to open a new issue with all the required information | ||
provided, including a [minimal, reproducible sample]. Make sure to | ||
diligently fill out the issue template. | ||
Thanks for your contribution. | ||
[minimal, reproducible sample]: https://stackoverflow.com/help/minimal-reproducible-example | ||
# Number of days of inactivity before an issue is closed. | ||
daysUntilClose: 7 | ||
# Only issues with this label will be closed (if they are inactive). | ||
responseRequiredLabel: waiting for response |
This file contains 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,31 @@ | ||
# This workflow is copied from Flutter | ||
# https://github.com/flutter/flutter/blob/3.16.0/.github/workflows/lock.yaml | ||
|
||
name: lock closed issues | ||
|
||
permissions: | ||
issues: write | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' | ||
|
||
jobs: | ||
lock: | ||
permissions: | ||
issues: write | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository == 'leancodepl/patrol' }} | ||
steps: | ||
- uses: dessant/lock-threads@v5 | ||
with: | ||
process-only: issues | ||
github-token: ${{ github.token }} | ||
# Number of days of inactivity before a closed issue is locked. | ||
issue-inactive-days: 7 | ||
issue-comment: > | ||
This issue has been automatically locked since there has not been | ||
any recent activity after it was closed. If you are still | ||
experiencing a similar problem, please file a new issue. Make | ||
sure to follow the template and provide all the information | ||
necessary to reproduce the issue. |