-
Notifications
You must be signed in to change notification settings - Fork 2k
55 lines (45 loc) · 1.61 KB
/
changelog.yaml
File metadata and controls
55 lines (45 loc) · 1.61 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Changelog
#
# Validates that a changelog entry was added.
# Runs on PRs when:
# - opened/re-opened
# - new commits pushed
# - label is added or removed
# Runs on merge queues, but just passes, because it is a required check.
name: Changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
# Required by GitHub merge queue due to branch protection rules. Should always be successful
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
validate-changelog:
permissions:
contents: read
pull-requests: none
runs-on: ubuntu-24.04
env:
NO_CHANGELOG: ${{ contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
SHOULD_RUN: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') && github.event_name != 'merge_group' }}
steps:
- name: Bypass when no‑changelog label is present
if: env.NO_CHANGELOG == 'true'
run: |
echo "'no-changelog' label detected – skipping changelog validation."
exit 0
- name: Merge queue
if: ${{ github.event_name == 'merge_group' }}
run: |
echo "merge_group event – passing without running changelog validation."
exit 0
# Checkout PR branch (includes script and changelog.d/)
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: env.SHOULD_RUN == 'true'
- name: Run changelog fragment checker
if: env.SHOULD_RUN == 'true'
run: |
# Compare against origin/master
./scripts/check_changelog_fragments.sh