Skip to content

Commit 6f53031

Browse files
authored
Merge pull request #4113 from github/mario-campos/add-changenote-script
Create `changetool` script for validating change-notes
2 parents 0963041 + f049ecb commit 6f53031

10 files changed

Lines changed: 2853 additions & 1418 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,33 @@ jobs:
7272
sarif_file: eslint.sarif
7373
category: eslint
7474

75+
changetool-tests:
76+
name: changetool unit tests
77+
permissions:
78+
contents: read
79+
runs-on: ubuntu-slim
80+
timeout-minutes: 10
81+
82+
concurrency:
83+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
84+
group: pr-checks-changetool-tests-${{ github.ref }}-${{ github.event_name }}
85+
86+
steps:
87+
- name: Checkout repository
88+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
89+
90+
- name: Set up Node.js
91+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
92+
with:
93+
node-version: 24
94+
cache: 'npm'
95+
96+
- name: Install dependencies
97+
run: npm ci
98+
99+
- name: Run changetool unit tests
100+
run: npm --workspace changetool test
101+
75102
# These checks do not need to be run as part of the same matrix that we use for the `unit-tests`
76103
# job.
77104
other-checks:

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,18 @@ export default [
209209
],
210210
},
211211
},
212+
{
213+
files: ["scripts/changetool/**/*.ts"],
214+
215+
languageOptions: {
216+
parserOptions: {
217+
project: "./scripts/changetool/tsconfig.json",
218+
},
219+
},
220+
221+
rules: {
222+
"no-console": "off",
223+
"import/extensions": "off",
224+
},
225+
},
212226
];

0 commit comments

Comments
 (0)