name: Check PR title
# This workflow is triggered on pushes to the repository.
on:
  pull_request:
    types: [opened, edited, synchronize, reopened]

jobs:
  build:
    if: ${{ github.actor != 'dependabot[bot]' }}
    name: Check that PR is associated with Jira ticket
    runs-on: "ubuntu-latest"
    steps:
      - uses: deepakputhraya/action-pr-title@master
        with:
          regex: '([A-Z]+)\-\d+\:\s+.*'
          disallowed_prefixes: "release/,feature/,feat/,hotfix"
          prefix_case_sensitive: false
          min_length: 5
          max_length: 100
          github_token: ${{ github.token }} # Default: ${{ github.token }}
