Skip to content

Commit 03d17ee

Browse files
committed
Minor bug fix to the comment action
1 parent cfbe0f7 commit 03d17ee

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/actions/comment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ runs:
194194
# If multiple ids are found with the same label, raise a warning
195195
[[ $(jq -r 'length' <<< "$ids") > 1 ]] && echo "::warning::Multiple comments found with the same label. The most recently updated comment will be used."
196196
# Get the last updated comment
197-
comment_id=$(jq -r 'last.id' <<< "$ids")
197+
comment_id=$(jq -r 'if length == 0 then "" else last.id end' <<< "$ids")
198198
fi
199199
# Log comment id and add it to GitHub outputs
200200
echo "Comment ID: ${comment_id}"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.vscode/
1+
.vscode/
2+
*_cache/

0 commit comments

Comments
 (0)