Skip to content

Commit a763563

Browse files
committed
Validate change-notes in PRs
This commit also introduces the 'empty' home directory for future change-notes.
1 parent 4e9950b commit a763563

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,32 @@ jobs:
255255
else
256256
echo "Skipping repo size comment because the delta is below the threshold and no sticky comment exists."
257257
fi
258+
259+
validate-change-notes:
260+
name: Validate change notes
261+
if: github.triggering_actor != 'dependabot[bot]'
262+
permissions:
263+
contents: read
264+
runs-on: ubuntu-slim
265+
266+
concurrency:
267+
cancel-in-progress: true
268+
group: pr-checks-validate-change-notes-${{ github.ref }}-${{ github.event_name }}
269+
270+
steps:
271+
- name: Checkout repository
272+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
273+
274+
- name: Set up Node.js
275+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
276+
with:
277+
node-version: 24
278+
cache: 'npm'
279+
280+
- name: Install dependencies
281+
run: npm ci
282+
283+
- name: Run `changetool validate`
284+
# "unreleased-change-notes" resolves to a path relative to scripts/changetool.
285+
# So, we need to pass the absolute path to the directory by prefixing $GITHUB_WORKSPACE.
286+
run: npm --workspace changetool start validate "$GITHUB_WORKSPACE/unreleased-change-notes"

unreleased-change-notes/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)