-
Notifications
You must be signed in to change notification settings - Fork 47
67 lines (57 loc) · 1.63 KB
/
changie-check-changelog.yaml
File metadata and controls
67 lines (57 loc) · 1.63 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
56
57
58
59
60
61
62
63
64
65
66
67
---
name: "check changelog"
on:
pull_request:
types:
# On by default if you specify no types.
- "opened"
- "reopened"
- "synchronize"
# For `skip-label` only.
- "labeled"
- "unlabeled"
env:
PR_COMMENT: |-
# Missing a changelog file.
To create a new changelog file, write a comment in the PR
using the `/changie` command: `/changie <kind> <change description>`
Supported kind are:
* Added
* Changed
* Deprecated
* Removed
* Fixed
* Security
* Enhanced
Examples:
* `/changie Added new FAQ question`
* `/changie Fixed typo in a blog post`
* `/changie Removed outdated section`
* `/changie Changed website layout`
> Note: If no changelog is needed on this PR, label it with
`skip changelog` to bypass this check.
jobs:
check-changelog:
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'skip changelog')"
steps:
- name: "Clone repository"
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: Get changed files in the docs folder
id: changelogs
uses: tj-actions/changed-files@v46
with:
files: |
.changes/unreleased/**.yaml
CHANGELOG.md
- name: Missing Changelog PR notification
if: "steps.changelogs.outputs.any_changed == 'false'"
uses: actions-cool/maintain-one-comment@v3
with:
body: ${{ env.PR_COMMENT }}
- name: Fail as the changelog is missing
if: steps.changelogs.outputs.any_changed == 'false'
run: exit 1