Files
actions/stale/action.yml
Ismo Vuorinen 7061aafd35 chore: add tests, update docs and actions (#299)
* docs: update documentation

* feat: validate-inputs has it's own pyproject

* security: mask DOCKERHUB_PASSWORD

* chore: add tokens, checkout, recrete docs, integration tests

* fix: add `statuses: write` permission to pr-lint
2025-10-18 13:09:19 +03:00

80 lines
2.7 KiB
YAML

# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
# permissions:
# - issues: write # Required for marking issues as stale
# - pull-requests: write # Required for marking PRs as stale
---
name: Stale
description: 'A GitHub Action to close stale issues and pull requests.'
author: 'Ismo Vuorinen'
branding:
icon: clock
color: yellow
inputs:
token:
description: 'GitHub token for authentication'
required: false
default: ''
days-before-stale:
description: 'Number of days of inactivity before an issue is marked as stale'
required: false
default: '30'
days-before-close:
description: 'Number of days of inactivity before a stale issue is closed'
required: false
default: '7'
outputs:
staled_issues_count:
description: 'Number of issues marked as stale'
value: ${{ steps.stale.outputs.stale-issues-prs }}
closed_issues_count:
description: 'Number of issues closed'
value: ${{ steps.stale.outputs.closed-issues-prs }}
runs:
using: composite
steps:
- name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ inputs.token || github.token }}
- name: Validate Inputs
id: validate
uses: ./validate-inputs
with:
action: 'stale'
token: ${{ inputs.token || github.token }}
days-before-stale: ${{ inputs.days-before-stale }}
days-before-close: ${{ inputs.days-before-close }}
- name: 🚀 Run stale
id: stale
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
with:
repo-token: ${{ inputs.token || github.token }}
days-before-stale: ${{ inputs.days-before-stale }}
days-before-close: ${{ inputs.days-before-close }}
remove-stale-when-updated: true
stale-issue-label: 'stale'
exempt-issue-labels: 'no-stale,help-wanted'
stale-issue-message: >
There hasn't been any activity on this issue recently, so we
clean up some of the older and inactive issues.
Please make sure to update to the latest version and
check if that solves the issue. Let us know if that works for you
by leaving a comment 👍
This issue has now been marked as stale and will be closed if no
further activity occurs. Thanks!
stale-pr-label: 'stale'
exempt-pr-labels: 'no-stale'
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.