Skip to content

Commit

Permalink
Close stale issues and PRs.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Jun 5, 2024
1 parent 0eeb030 commit 5cfac9d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Close stale issues and PRs

on:
schedule:
- cron: '0 19 * * *'

workflow_dispatch:

workflow_call:

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Run stale action
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
operations-per-run: 120
days-before-close: 10
stale-issue-label: stale
stale-pr-label: stale
exempt-issue-labels: essential
exempt-pr-labels: essential

days-before-issue-stale: 260
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
close-issue-message: >
This issue has been automatically closed because it has not had
recent activity.
days-before-pr-stale: 20
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
close-pr-message: >
This pull request has been automatically closed because it has not had
recent activity.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,21 @@ See [setup-cargo-bundle-licenses/action.yaml] for all options.

[cargo-bundle-licenses]: https://github.com/sstadick/cargo-bundle-licenses
[setup-cargo-bundle-licenses/action.yaml]: setup-cargo-bundle-licenses/action.yaml

## stale

To reuse the standard stale workflow, create a workflow `stale.yaml` with the
contents:
```yaml
name: Close stale issues and PRs
on:
schedule:
- cron: '0 19 * * *'
workflow_dispatch:
jobs:
stale:
uses: glotzerlab/workflows/.github/workflows/stale.yaml@<insert hash of tagged version here> # v0.1.0
```

0 comments on commit 5cfac9d

Please sign in to comment.