From dd61453c110d672d76477371aa3ffac409bbfbee Mon Sep 17 00:00:00 2001 From: Chris Scott Date: Tue, 16 Apr 2024 10:03:09 -0400 Subject: [PATCH] Migrate stalebot to Github Actions --- .github/stale.yml | 41 ------------------------------------ .github/workflows/stale.yaml | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 41 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yaml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index e06375d..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,41 +0,0 @@ -# Configuration for probot-stale based on: https://github.com/facebook/react-native/blob/master/.github/stale.yml - - # Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 60 - - # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -daysUntilClose: 7 - - # Issues or Pull Requests. -exemptLabels: - - pinned - - security - - discussion - - # Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - - # Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - - # Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - - # Label to use when marking as stale -staleLabel: stale - - # Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. You may also mark this issue as a "discussion" and I - will leave this open. - # Comment to post when closing a stale Issue or Pull Request. -closeComment: > - Closing this issue after a prolonged period of inactivity. Fell free to reopen - this issue, if this still affecting you. - # Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - - # Limit to only `issues` or `pulls` -only: issues diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 0000000..c011077 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,25 @@ +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + operations-per-run: 100 + days-before-issue-stale: 30 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} + +