Label Stale Contributions #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------------------- | |
# GitHub Actions Workflow: Label Stale Contributions | |
# Description: Labels stale contributions | |
# Job: actions/stale | |
# ----------------------------------------------------------------------------- | |
name: Label Stale Contributions | |
on: | |
workflow_dispatch: # enables manual trigger | |
# Scheduled to run at 12:00 on every Monday | |
schedule: | |
- cron: "0 0 * * MON" | |
jobs: | |
# Trigger: Scheduled weekly | |
# Returns: labels issues and PRs with 'stale' after 30 days inactivity | |
# PRs: automated closing after 1 more week of inactivity | |
# Issues: requires manual closing by maintainers | |
stale: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/stale@v9 # https://github.com/actions/stale | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
stale-issue-label: "stale" | |
stale-pr-label: "stale" | |
days-before-stale: 30 | |
# disables closing issues | |
days-before-issue-close: -1 | |
days-before-pr-close: 7 | |
# only scan assigned issues | |
include-only-assigned: true | |
# ignore issues assigned to staff and bots | |
exempt-assignees: "kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions" | |
# disable removing stale label due to irrelevant activity (like branch updates) | |
remove-stale-when-updated: false | |
# exempt dependabot prs from going stale | |
exempt-pr-labels: dependencies | |
# disable counting irrelevant activity (branch updates) towards day counter on prs. | |
ignore-pr-updates: true | |
# actions/stale does not enable tagging authors / assignees, so comments are handled by Issue Comments Workflows. | |
stale-pr-message: "As per Chayn policy, after 30 days of inactivity, we will close this PR in 7 days. Please comment or update to keep open." |