Skip to content

Commit eefa7b2

Browse files
committed
ci: add changelog and enforce new entries on every PR
1 parent d13e8b5 commit eefa7b2

File tree

3 files changed

+3691
-0
lines changed

3 files changed

+3691
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Update unreleased section in CHANGELOG"
2+
on:
3+
pull_request:
4+
types: [ "opened", "synchronize", "reopened", "ready_for_review", "labeled", "unlabeled" ]
5+
6+
permissions:
7+
contents: "read"
8+
9+
jobs:
10+
changelog:
11+
runs-on: "depot-ubuntu-24.04-small"
12+
steps:
13+
- uses: "dangoslen/changelog-enforcer@ea6a56764870c323a4563f450c0a50c5f2d72cd6"
14+
with:
15+
skipLabels: 'Skip-Changelog,dependencies,tests'
16+
- uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2
17+
- uses: "actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f" # v6.1.0
18+
- run: "npx [email protected]"
19+
- run: |
20+
files=$(git status --porcelain)
21+
if [[ -n ${files} ]]; then
22+
>&2 echo "If your PR has a change that users might care about, please edit the CHANGELOD.md and run \`npx keep-a-changelog\`. Otherwise, add the Skip-Changelog label to the PR."
23+
>&2 echo ""
24+
>&2 echo "${files}"
25+
>&2 echo ""
26+
exit 1
27+
fi

.github/workflows/lint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on: # yamllint disable-line rule:truthy
1212
- "checks_requested"
1313
permissions:
1414
contents: "read"
15+
pull-requests: "read"
1516
jobs:
1617
go-license-check:
1718
name: "License Check"
@@ -54,4 +55,7 @@ jobs:
5455
if: "github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.action == 'reopened' || github.event.action == 'edited')"
5556
steps:
5657
- uses: "actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493" # v4.2.2
58+
# validates the commits
5759
- uses: "webiny/[email protected]"
60+
# validates the PR titles
61+
- uses: "amannn/action-semantic-pull-request@v6"

0 commit comments

Comments
 (0)