-
Notifications
You must be signed in to change notification settings - Fork 39
34 lines (31 loc) · 1.05 KB
/
changelog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Shamelessly copied from contrib
# This action requires that any PR targeting the main branch should touch at
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "skip-changelog"
# label to disable this action.
name: changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
jobs:
changelog:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'skip-changelog')"
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Add PR base ref
run: |
git fetch origin ${{ github.base_ref }} --depth=50
- name: install towncrier
run: make install-towncrier
- name: Check if new CHANGELOG entries added
run: |
make check-changelog
- name: Check if new CHANGELOG entries reference the correct PR
run: |
git diff --name-only origin/${{ github.base_ref }} HEAD .changelog | grep ${PR_NUMBER}