Skip to content

Commit 667d6f1

Browse files
authored
Merge pull request #6678 from nextcloud-libraries/backport/5202/next
[next] chore: Make CHANGELOG.md content consistent styling
2 parents 9610a09 + 9d3ec55 commit 667d6f1

File tree

5 files changed

+231
-122
lines changed

5 files changed

+231
-122
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Changelog
5+
6+
on: pull_request
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: node-changelog-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
changes:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
pull-requests: read
21+
22+
outputs:
23+
src: ${{ steps.changes.outputs.src}}
24+
25+
steps:
26+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
27+
id: changes
28+
continue-on-error: true
29+
with:
30+
filters: |
31+
src:
32+
- 'CHANGELOG.md'
33+
34+
lint:
35+
runs-on: ubuntu-latest
36+
37+
needs: changes
38+
if: needs.changes.outputs.src != 'false'
39+
40+
name: Lint changelog
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
with:
45+
persist-credentials: false
46+
47+
- name: Set up node
48+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
49+
with:
50+
node-version-file: 'package.json'
51+
52+
- name: Install dependencies and lint
53+
run: |
54+
npm ci
55+
npm run prerelease:format-changelog
56+
57+
- name: Check CHANGELOG changes
58+
run: |
59+
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please adjust the style of the CHANGELOG and commit it. Run \"npm run prerelease:format-changelog\"' && exit 1)"
60+
61+
- name: Show changes on failure
62+
if: failure()
63+
run: |
64+
git status
65+
git diff CHANGELOG.md
66+
exit 1 # make it red to grab attention
67+
68+
summary:
69+
permissions:
70+
contents: none
71+
runs-on: ubuntu-latest
72+
needs: [changes, lint]
73+
74+
if: always()
75+
76+
name: Changelog lint summary
77+
78+
steps:
79+
- name: Summary status
80+
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)