name: Stale PRs

on:
  schedule:
    # Every workday at 2am
    - cron: '0 2 * * 1-5'

permissions:
  contents: read

jobs:
  stale_prs:
    # Do not run on forks (we want this request to happen only once every night)
    permissions:
      contents: none
    if: github.repository_owner == 'coq'
    runs-on: ubuntu-latest
    steps:
      - run: curl -d "coq:coq:${{ secrets.DAILY_SCHEDULE_SECRET }}" https://coqbot.herokuapp.com/check-stale-pr
