Skip to content

Commit

Permalink
Create Stale bot for the repo (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasireddy99 authored Nov 16, 2022
1 parent 20079c8 commit 0e8f225
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

name: 'Close stale issues and PR'
on:
schedule:
- cron: '0 20 * * SUN' # every Sunday at 20 am UTC: PST 0:00 AM "


jobs:
stale-close:
runs-on: ubuntu-latest
steps:
- name: Mark the issues/pr
uses: actions/stale@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #Github workflow will add a temporary token when executing the workflow
with:
#Github stale actions: https://github.com/actions/stale
#Message
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
close-issue-message: 'This issue was closed because it has been marked as stale for 30 days with no activity.'
#Labels
stale-issue-label: stale #Mark the issue as closing-soon if staling for 60 days
stale-pr-label: stale #Mark the pr as no-pr-activity if staling for 30 days
#Days required
days-before-issue-stale: 90 #Mark the issues as after 90 days
days-before-pr-stale: 60 #Mark the PR as stale after 60 days
days-before-issue-close: 30 #Close the issue if the issue has been marked as stale for 30 days
days-before-pr-close: -1 #Never close down the PR and keep the label stale on the PR
#Optionals
enable-statistics: true #Show the statistics of what have done so far
operations-per-run: 100 #Max number of operations per run

0 comments on commit 0e8f225

Please sign in to comment.