Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Stale bot in the repo #271

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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