name: '📝 Check Release Note'

on:
  pull_request:
    branches:
      - main
      - v*.*.*
      - epic-*
    tags-ignore:
      - '*.*'  # ignore releases

jobs:
  release-note-entry:
    name: 'Checking release note entry for PR ${{ github.event.number }}'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Check for presence of newsfragment file
        run: ls -l ${{ github.workspace }}/newsfragments/ | grep -E '${{ github.event.number }}\.(feature|bugfix|doc|removal|misc|dev)\.rst'
