mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
a0477f0d0b
Use human activity and observed head changes because GitHub can update PR timestamps without contributor activity. Audit every open PR before applying changes and start existing PRs from a safe baseline.
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: Stale Pull Requests
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "30 3 * * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
mode:
|
|
description: Run without changes or apply the PR inactivity policy
|
|
type: choice
|
|
required: true
|
|
default: dry-run
|
|
options:
|
|
- dry-run
|
|
- apply
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: stale-pull-requests
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
stale-prs:
|
|
name: Check Every Open PR
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version: 24
|
|
- name: Check PR inactivity
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
RUN_MODE: ${{ github.event_name == 'schedule' && 'apply' || inputs.mode }}
|
|
run: node scripts/stale-prs/run.mjs "--${RUN_MODE}"
|