name: check contributor list

on:
  workflow_dispatch:
  pull_request:
    paths:
      - 'CONTRIBUTING.md'
      - '.github/workflows/shortlog.yml'
      - '.mailmap'
  schedule:
    - cron: '37 06 * * 1' # 06:37, Monday

jobs:
  test:
    runs-on: 'ubuntu-latest'
    timeout-minutes: 10
    steps:
      - name: Checkout
        uses: actions/checkout@v5
        with:
          fetch-depth: 0  # need to fetch all commits to check contributors
          ref: ${{ github.event.pull_request.head.sha }}

      - name: Check CONTRIBUTING.md
        uses: cylc/release-actions/check-shortlog@v1
