Skip to content

Commit 95d1285

Browse files
authored
ci: fix changelog checker by trimming the 'changelog/' prefix (#2368)
1 parent c179d7b commit 95d1285

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/actions/check_new_changelog/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ runs:
1818
NEW_CHANGELOGS: ${{ steps.new-changelogs.outputs.added_files }}
1919
PR_NUMBER: ${{ github.event.number }}
2020
run: |
21+
# `cl` will be something like "changelog/1.added.md"
2122
for cl in ${NEW_CHANGELOGS}; do
23+
# Trim the directory name
24+
prefix="changelog/"; trimmed_cl=${cl/#$prefix}; cl="${trimmed_cl}";
25+
2226
# parse it
2327
IFS='.' read id kind file_extension <<< "${cl}"
2428

0 commit comments

Comments
 (0)