Skip to content

Mark stale issues and pull requests #330

Mark stale issues and pull requests

Mark stale issues and pull requests #330

Workflow file for this run

# This GitHub Actions workflow is designed to automatically mark issues and pull requests as stale
# if they have had no activity for a specified amount of time. It uses the `actions/stale` action
# to perform this task. The workflow is scheduled to run daily at 07:38 AM (UTC) as specified by
# the cron expression.
#
# The workflow has the following permissions:
# - Read access to repository contents.
# - Write access to issues and pull requests.
#
# The workflow consists of a single job named `stale` that runs on the latest Ubuntu runner.
# The job includes the following steps:
# 1. Harden Runner: Uses the `step-security/harden-runner` action to enhance the security of the
# runner by auditing egress traffic.
# 2. Mark Stale Issues and PRs: Uses the `actions/stale` action to mark issues and pull requests
# as stale. The action is configured with the following parameters:
# - `repo-token`: The GitHub token used to authenticate the action.
# - `stale-issue-message`: The message to post on stale issues.
# - `stale-pr-message`: The message to post on stale pull requests.
# - `stale-issue-label`: The label to apply to stale issues.
# - `stale-pr-label`: The label to apply to stale pull requests.
#
# For more information on configuring the `actions/stale` action, visit:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: "38 7 * * *"
pull_request_target:
types: [opened, reopened, synchronize]
issues:
types: [opened, reopened, edited]
workflow_dispatch:
permissions:
contents: read
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
concurrency:
group: stale-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "Stale issue"
stale-pr-message: "Stale pull request"
stale-issue-label: "no-issue-activity"
stale-pr-label: "no-pr-activity"