Skip to content

Commit

Permalink
Check newsfragments using a custom Action
Browse files Browse the repository at this point in the history
  • Loading branch information
A5rocks committed Aug 4, 2024
1 parent 20f9291 commit 9ddc4b2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check-newsfragment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check newsfragment

on:
pull_request:
types: [labeled, unlabeled, opened, closed, synchronize]
branches:
- main

jobs:
check-newsfragment:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip newsfragment') }}
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check newsfragments
run: |
if git diff --name-only origin/main | grep -v '/_tests/' | grep 'src/trio/'; then
git diff --name-only origin/main | grep 'newsfragments/' || exit 1
fi

0 comments on commit 9ddc4b2

Please sign in to comment.