# This is the workflow to validate a PR
#
name: Lint Pull Request

on:
  # Allows you to call this workflow from other workflows
  workflow_call:

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

permissions:
  contents: read

jobs:
  lint-pr:
    name: '🕵️‍♂️ Lint Commit Message'
    runs-on: ubuntu-latest

    permissions:
      pull-requests: write

    steps:
      # check for the most recent release: https://github.com/Namchee/conventional-pr/releases
      - name: '✅ Lint PR'
        uses: Namchee/conventional-pr@v0.15.6
        with:
          access_token: ${{ secrets.GITHUB_TOKEN }}
          label: '⁉️ invalid'
          branch_pattern: ''
          message: "The PR doesn't match the requirements"
