From 84708f9a634028938690fb5d364ea97c469c93af Mon Sep 17 00:00:00 2001 From: William McLendon Date: Mon, 23 Nov 2020 12:22:30 -0700 Subject: [PATCH 1/2] Framework: Add GitHub Actions script to close stale issues and PR's Adding initial github runner script which will mark issues and PR's as stale after 365 days of inactivity and then close them after another 30 days from being marked for closure. This is in debug mode currently so it should not actually affect any issues or PR's. --- .github/workflows/stale.yml | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000000..e3b72b1ab71a --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,69 @@ +# +# This workflow will process issues and PR's to determine if they are stale and/or need to be +# removed. +# +name: "Close stale issues" +on: + # For debugging: toggle action by starring/unstarring the repo + watch: + types: [started] + # Regular scheduling, run daily at 6AM Mountain time (12:00pm UTC) + # - Note: Mountain Standard Time (MST) is 7 hours behind UTC during the winter. + # Cron strings: MIN HR DOM MON DOW + schedule: + - cron: "0 12 * * *" + + +# See https://github.com/actions/stale/blob/master/action.yml for information on actions +# that GitHub knows for stale issues. + + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3.0.14 + with: + debug-only: true + ascending: true + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 365 + days-before-close: 30 + stale-issue-label: 'MARKED_FOR_CLOSURE' + stale-pr-label: 'MARKED_FOR_CLOSURE' + close-pr-label: 'CLOSED_DUE_TO_INACTIVITY' + exempt-issue-labels: 'DO_NOT_AUTOCLOSE' + # We specifically DO NOT exempt PR's from autoclosing. + #exempt-pr-labels: '' + remove-stale-when-updated: true + operations-per-run: 30 + stale-issue-message: > + This issue has had no activity for **365** days and is marked for + closure. It will be closed after an additional **30** days of inactivity. + + If you would like to keep this issue open please add a comment and remove + the `MARKED_FOR_CLOSURE` label. + + If this issue should be kept open even with no activity beyond the time + limits you can add the label `DO_NOT_AUTOCLOSE`. + + close-issue-message: > + This issue was closed due to inactivity for **395** days. + + stale-pr-message: > + This Pull Request has been *marked for closure* due to inactivity. + + Because of the changing nature of the Trilinos source due to active + development, a pull request with _no_ activity for **365** days is + considered to be abandoned and will be automatically closed after **30** + additional days of inactivity from when it was marked inactive. + + If this should be kept open, please post a comment and remove the + label `MARKED_FOR_CLOSURE` to reset the inactivity timer. + + close-pr-message: > + This Pull Request has been automatically closed due to **395** days of inactivity. + + + + From 8623b4dd3a6246a841484e28d504c365c61c374b Mon Sep 17 00:00:00 2001 From: William McLendon Date: Mon, 23 Nov 2020 12:44:22 -0700 Subject: [PATCH 2/2] Framework: Gitlab Runner - Remove 'start on star' capability --- .github/workflows/stale.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e3b72b1ab71a..abcc5d2cbd87 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,9 +4,6 @@ # name: "Close stale issues" on: - # For debugging: toggle action by starring/unstarring the repo - watch: - types: [started] # Regular scheduling, run daily at 6AM Mountain time (12:00pm UTC) # - Note: Mountain Standard Time (MST) is 7 hours behind UTC during the winter. # Cron strings: MIN HR DOM MON DOW