Skip to content

Commit 0e13483

Browse files
authored
ci: Lint changelogs in CI (#3512)
Seems that we unintentionally stopped validating changelogs in CI at some point. This adds a step to start validating them again.
1 parent 6399f71 commit 0e13483

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ jobs:
126126
is-high-risk-environment: false
127127
- name: Lint
128128
run: yarn lint
129+
- name: Validate changelogs
130+
run: yarn changelog:validate
129131
- name: Require clean working directory
130132
shell: bash
131133
run: |

packages/examples/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"scripts": {
2323
"build": "yarn workspaces filter --include 'packages/examples/packages/**' --parallel --no-private run build",
2424
"build:clean": "yarn clean && yarn build",
25-
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/example-snaps",
2625
"changelog:validates": "yarn workspaces foreach --worktree --parallel --verbose run changelog:validate",
2726
"clean": "yarn workspaces foreach --worktree --parallel --verbose --no-private run clean",
2827
"lint": "yarn workspaces foreach --worktree --parallel --verbose --interlaced --no-private run lint && yarn lint:dependencies",

packages/examples/packages/invoke-snap/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"scripts": {
2323
"build": "yarn workspaces foreach --worktree --parallel --verbose run build",
2424
"build:clean": "yarn clean && yarn build",
25-
"changelog:validate": "../../../../scripts/validate-changelog.sh @metamask/invoke-snap-example-snap",
2625
"clean": "yarn workspaces foreach --worktree --parallel --verbose run clean",
2726
"lint": "yarn workspaces foreach --worktree --parallel --verbose --interlaced run lint && yarn lint:dependencies",
2827
"lint:ci": "yarn lint:eslint && yarn lint:misc --check",

yarn.config.cjs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,18 @@ module.exports = defineConfig({
148148

149149
// All non-root package must have valid "changelog:update" and
150150
// "changelog:validate" scripts.
151-
expectWorkspaceField(
152-
workspace,
153-
'scripts.changelog:validate',
154-
`${getRelativePath(workspace, 'scripts/validate-changelog.sh')} ${
155-
workspace.manifest.name
156-
}`,
157-
);
158-
expectWorkspaceField(
159-
workspace,
160-
'scripts.changelog:validate',
161-
`${getRelativePath(workspace, 'scripts/validate-changelog.sh')} ${
162-
workspace.manifest.name
163-
}`,
164-
);
151+
if (
152+
workspace.cwd !== 'packages/examples' &&
153+
workspace.cwd !== 'packages/examples/packages/invoke-snap'
154+
) {
155+
expectWorkspaceField(
156+
workspace,
157+
'scripts.changelog:validate',
158+
`${getRelativePath(workspace, 'scripts/validate-changelog.sh')} ${
159+
workspace.manifest.name
160+
}`,
161+
);
162+
}
165163

166164
// All non-root packages must have a valid "since-latest-release" script.
167165
expectWorkspaceField(

0 commit comments

Comments
 (0)