| 1 |
name: Check newsfragment |
| 2 |
|
| 3 |
permissions: {} |
| 4 |
|
| 5 |
on: |
| 6 |
pull_request: |
| 7 |
types: [labeled, unlabeled, opened, synchronize] |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
jobs: |
| 12 |
check-newsfragment: |
| 13 |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip newsfragment') }} |
| 14 |
runs-on: 'ubuntu-latest' |
| 15 |
|
| 16 |
steps: |
| 17 |
- uses: actions/checkout@v7 |
| 18 |
with: |
| 19 |
fetch-depth: 0 |
| 20 |
persist-credentials: false |
| 21 |
|
| 22 |
- name: Check newsfragments |
| 23 |
run: | |
| 24 |
if git diff --name-only origin/main | grep -v '/_tests/' | grep 'src/trio/'; then |
| 25 |
git diff --name-only origin/main | grep 'newsfragments/' || exit 1 |
| 26 |
fi |