generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 25
/
action.yml
50 lines (46 loc) · 2.69 KB
/
action.yml
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
name: 'Changelog Enforcer'
author: '@dangoslen'
description: 'Enforces a repository changelog to be kept up to date.'
outputs:
errorMessage:
description: "A message containing the reason why the Changelog Enforcer failed."
inputs:
changeLogPath:
description: 'Path to the changelog file relative to the repository'
required: true
default: 'CHANGELOG.md'
skipLabels:
description: |
"List of labels used to skip enforcing of the changelog during a pull request. Each label name is comma separated and only one label needs to be
present for enforcement to be skipped.
For example, if `label-1,label-2` was supplied as the `skipLabels`, `label-1` _or_ `label-2` would skip the enforcer.
Each label is trimmed for leading and trailing spaces since GitHub labels do not allow for leading or trailing spaces. Thus, the following lists are equivalent:
* `label-1,label-2`
* `label-1 , label-2`
* `label-1 ,label-2`"
required: true
default: 'Skip-Changelog'
expectedLatestVersion:
description: "The latest version of the software expected in the changelog. Should be in the form of 'v1.1.0' etc."
required: true
default: ''
versionPattern:
description: |
"A regex pattern used to extract the version section headings from the changelog. Changelog Enforcer assumes the use of the [KeepAChangelog.com](https://keepachangelog.com/en/1.0.0/) convention for section headings, and as such looks for a line starting with `## [version] - date`. Versions are only extracted from the changelog when enforcing the expected latest version (via the `expectedLatestVersion` property).
If you supply your own regex to match a different format, your regex must match the version string as a capture group (in the default format, that's the part inside square brackets). The first capture group will be used if your regex includes multiple groups. The regex pattern is used with global and multiline flags to find all of the versions in the changelog.
Because the regex is passed as a `String` object, you will need to escape backslash characters (`\`) via `\\`."
required: true
default: "^## \\[((v|V)?\\d*\\.\\d*\\.\\d*-?\\w*|unreleased|Unreleased|UNRELEASED)\\]"
missingUpdateErrorMessage:
description: "The error message logged and returned in the 'errorMessage' output when no update to the changelog has been found."
required: false
token:
description: "The secret value from your GITHUB_TOKEN or another token to access the GitHub API. Defaults to the token at `github.token`"
required: true
default: ${{ github.token }}
runs:
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'check-square'
color: 'orange'