Skip to content

Commit 0f94655

Browse files
committed
fix: advices may be undefined
1 parent de749af commit 0f94655

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22

33
Github action to create a release on Bytebase.
44

5-
65
# Naming scheme
76

8-
The migration files matched by `file-pattern` are assumed to follow a naming scheme.
9-
It should start with digit version numbers, separated by underscore, and optionally end with
10-
a change type. Format: `path/to/migrations/<<version>>_xxxx_<<changeType>>.sql`
11-
This action determines the change type of a file by how its filename ends. The
12-
default change type is schema change.
7+
The migration files matched by `file-pattern` are assumed to follow a naming
8+
scheme. It should start with digit version numbers, separated by underscore, and
9+
optionally end with a change type. Format:
10+
`path/to/migrations/<<version>>_xxxx_<<changeType>>.sql` This action determines
11+
the change type of a file by how its filename ends. The default change type is
12+
schema change.
1313

1414
Examples:
15+
1516
- 20250101001_add_column.sql
1617
- 20250101002_fill_default_data_dml.sql
1718

18-
1919
| Ends with | Type |
2020
| --------- | -------------------- |
2121
| ddl | schema change |
2222
| ghost | online schema change |
2323
| dml | data change |
2424

25-
2625
# Inputs
2726

2827
| Input Name | Required | Default Value | Description | Type |

dist/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ async function doCheckRelease(
287287
const file = result.file
288288
const target = result.target
289289
const advices = result.advices
290+
if (!advices) {
291+
continue
292+
}
290293

291294
for (const advice of advices) {
292295
const key = `${file}-${advice.status}-${advice.code}-${advice.line}-${advice.column}-${advice.title}`

0 commit comments

Comments
 (0)