# Checks if a changelog is missing in the PR diff
name: Changelog Reminder
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
    paths: ["**/*.go"]
permissions:
  pull-requests: write
jobs:
  remind:
    name: Changelog Reminder
    runs-on: depot-ubuntu-22.04-4
    # Skip draft PRs and PRs starting with: revert, test, chore, ci, docs, style, build, refactor
    if: "!github.event.pull_request.draft && !contains(github.event.pull_request.title, 'revert') && !contains(github.event.pull_request.title, 'test') && !contains(github.event.pull_request.title, 'chore') && !contains(github.event.pull_request.title, 'ci') && !contains(github.event.pull_request.title, 'docs') && !contains(github.event.pull_request.title, 'style') && !contains(github.event.pull_request.title, 'build') && !contains(github.event.pull_request.title, 'refactor')"
    steps:
      - uses: actions/checkout@v4
      - uses: mskelton/changelog-reminder-action@v3
        with:
          message: "@${{ github.actor }} your pull request is missing a changelog!"
