Skip to content

PR Inactivity Reminder Bot #42

PR Inactivity Reminder Bot

PR Inactivity Reminder Bot #42

# This workflow warns PRs that have had no activity for a specified amount of time(10 Days).
name: PR Inactivity Reminder Bot
on:
schedule:
- cron: "0 11 * * *"
workflow_dispatch:
inputs:
dry_run:
description: 'If true, do not post comments (dry run). Accepts "true" or "false". Default true for manual runs.'
required: false
default: "true"
permissions:
pull-requests: write
issues: write
contents: read
jobs:
remind_inactive_prs:
runs-on: hl-sdk-py-lin-md
env:
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
steps:
- name: Harden the runner
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Remind authors of inactive PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ env.DRY_RUN }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
with:
script: |
const script = require('./.github/scripts/cron-reminder-pr-inactive.js')
await script({ github, context });