Debian Codegraph @

.github/workflows/changelog.yml

raw symbols SCIP
1 # This action requires that any PR targeting the main branch should touch at
2 # least one CHANGELOG file. If a CHANGELOG entry is not required, or if
3 # performing maintenance on the Changelog, add either \"[chore]\" to the title of
4 # the pull request or add the \"Skip Changelog\" label to disable this action.
5
6 name: changelog
7
8 on:
9 pull_request:
10 types: [opened, synchronize, reopened, labeled, unlabeled]
11 branches:
12 - main
13 permissions:
14 contents: read
15 jobs:
16 changelog:
17 runs-on: ubuntu-latest
18 if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}}
19
20 steps:
21 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22
23 - name: Check for CHANGELOG changes
24 run: |
25 # Only the latest commit of the feature branch is available
26 # automatically. To diff with the base branch, we need to
27 # fetch that too (and we only need its latest commit).
28 git fetch origin ${{ github.base_ref }} --depth=1
29 if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]]
30 then
31 echo "A CHANGELOG was modified. Looks good!"
32 else
33 echo "No CHANGELOG was modified."
34 echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required."
35 false
36 fi