Skip to content

Commit d77f69d

Browse files
authored
chore: minor CI fixes (#2725)
1 parent 8dbaf98 commit d77f69d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/scripts/prevent-invalid-changesets.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = async ({ core, exec }) => {
1616

1717
const allFilenames = stdout.split("\n").filter((line) => line.trim());
1818
const changesetFilenames = allFilenames.filter(
19-
(file) => file.startsWith(".changeset/") && file.endsWith(".md")
19+
(file) => file.startsWith(".changeset/") && file.endsWith(".md"),
2020
);
2121

2222
if (changesetFilenames.length === 0) {
@@ -45,8 +45,10 @@ module.exports = async ({ core, exec }) => {
4545
}
4646

4747
if (!fs.existsSync(filename)) {
48-
core.setFailed(`File not found: ${filename}`);
49-
return;
48+
core.warning(
49+
`File not found: ${filename}. This is likely a version PR where the changeset was already consumed. Skipping validation for this file.`,
50+
);
51+
continue;
5052
}
5153

5254
// check file size (limit to 100KB)
@@ -83,18 +85,18 @@ module.exports = async ({ core, exec }) => {
8385

8486
if (packageMatches) {
8587
const invalidPackages = packageMatches.filter(
86-
(pkg) => pkg !== '"@bigcommerce/catalyst-makeswift"'
88+
(pkg) => pkg !== '"@bigcommerce/catalyst-makeswift"',
8789
);
8890

8991
if (invalidPackages.length > 0) {
9092
core.error(
9193
`Invalid package found in changeset file. Only @bigcommerce/catalyst-makeswift is allowed.`,
92-
{ file: filename }
94+
{ file: filename },
9395
);
9496
core.setFailed(
9597
`File ${filename} contains invalid packages: ${invalidPackages.join(
96-
", "
97-
)}`
98+
", ",
99+
)}`,
98100
);
99101
return;
100102
}

.github/workflows/basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Basic
22

33
on:
44
push:
5-
branches: [canary]
5+
branches: [canary, integrations/makeswift, integrations/b2b-makeswift]
66
pull_request:
77
types: [opened, synchronize]
88
merge_group:

0 commit comments

Comments
 (0)