From ac754151693ecff9dfc9fb7547ff1737b14bf3e0 Mon Sep 17 00:00:00 2001 From: Reece Hart Date: Mon, 12 Feb 2024 20:13:00 -0800 Subject: [PATCH] migrate stale action from actions repo --- .github/workflows/stale.yml | 2 +- README.md | 46 ++++++++++++++++++++----------------- actions/stale.yml | 26 +++++++++++++++++++++ 3 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 actions/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0829446..375f67e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -8,4 +8,4 @@ on: jobs: stale: - uses: biocommons/actions/.github/workflows/stale.yml@main + uses: biocommons/.github/actions/stale.yml@main diff --git a/README.md b/README.md index 959f63c..f7a55ea 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This repo contains biocommons-wide configuration and templates. The contents of this repo are used in various ways by GitHub. Here's a summary: +- actions/ contains GitHub Actions with configuration that is used by biocommons repos. + - .github/ISSUE_TEMPLATE are used by all organization repos directly. Changes to these templates will be available to other organizations repos. NOTE: If repos have their own .github/ISSUE_TEMPLATE directory, these templates will not be available (so don't do that). - .github/workflows are *templates* available for manual selective incorporation into other repos. @@ -16,24 +18,26 @@ The contents of this repo are used in various ways by GitHub. Here's a summary: --- - snafu$ tree */ .github/ - docs/ - ├── CODE_OF_CONDUCT.md - ├── CONTRIBUTING.md - ├── GOVERNANCE.md - └── SUPPORT.md - etc/ - └── labels.yml - profile/ - └── README.md - .github/ - ├── CODEOWNERS - ├── ISSUE_TEMPLATE - │   ├── bug-report.md - │   ├── feature-request.md - │   └── project-proposal.md - ├── labels.yml - └── workflows - ├── labels.yml - ├── python-package.yml - └── stale.yml + snafu$ tree */ .github/ + actions/ + └── stale.yml + docs/ + ├── CODE_OF_CONDUCT.md + ├── CONTRIBUTING.md + ├── GOVERNANCE.md + └── SUPPORT.md + etc/ + └── labels.yml + profile/ + └── README.md + .github/ + ├── CODEOWNERS + ├── ISSUE_TEMPLATE + │   ├── bug-report.md + │   ├── feature-request.md + │   └── project-proposal.md + ├── labels.yml + └── workflows + ├── labels.yml + ├── python-package.yml + └── stale.yml diff --git a/actions/stale.yml b/actions/stale.yml new file mode 100644 index 0000000..9d4e756 --- /dev/null +++ b/actions/stale.yml @@ -0,0 +1,26 @@ +name: 'Close stale issues and PRs' +on: workflow_call + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + exempt-all-milestones: true + exempt-issue-labels: bug,keep-alive + exempt-pr-labels: bug,keep-alive + + days-before-issue-close: 7 + days-before-issue-stale: 90 + stale-issue-label: stale + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-issue-label: closed-by-stale + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' + + days-before-pr-close: 7 + days-before-pr-stale: 30 + stale-pr-label: stale + stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-pr-label: closed-by-stale + close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'