name: Pull request
on:
  pull_request:
    types:
      - opened
      - reopened
      - edited
      - synchronize

jobs:
  lint:
    runs-on: ubuntu-latest
    name: Lint
    steps:
      - name: Check PR title
        uses: amannn/action-semantic-pull-request@v1.2.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Pull request
on:
  pull_request_target:
    types:
      - opened
      - reopened
      - edited
      - synchronize

jobs:
  lint:
    runs-on: ubuntu-latest
    name: Lint
    steps:
      - name: Check PR title
        uses: amannn/action-semantic-pull-request@v1.2.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Update py.yml to include pull_request_target
Update py.yml to include pull_request_target