Skip to content

Commit

Permalink
Merge pull request #2642 from cta-observatory/changelog-checks
Browse files Browse the repository at this point in the history
Fix changelog checks
  • Loading branch information
maxnoe authored Nov 8, 2024
2 parents bd4e73e + 40f51bf commit 63295fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ on:
types: [opened, reopened, labeled, unlabeled, synchronize]

env:
FRAGMENT_NAME: "docs/changes/${{ github.event.number }}.{feature,bugfix,api,datamodel,optimization,maintenance}.rst"
FRAGMENT_NAME_PREFIX: "docs/changes/${{ github.event.number }}"

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for news fragment
if: ${{ ! contains( github.event.pull_request.labels.*.name, 'no-changelog-needed')}}
uses: andstor/file-existence-action@v3
with:
files: ${{ env.FRAGMENT_NAME }}
fail: true
- name: Check for at least one changelog fragment
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-needed') }}
run: |
find docs/changes -type f | \
grep -P "${FRAGMENT_NAME_PREFIX}\.(feature|bugfix|api|datamodel|optimization|maintenance)\.rst"

0 comments on commit 63295fa

Please sign in to comment.