Skip to content

Commit dea395a

Browse files
committed
github: fix post-issue
The `jq` command was printing out `null` and we were treating that as an existing issue number and trying to add a comment to it.
1 parent 1b262df commit dea395a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/actions/post-issue/action.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ runs:
3838
shell: bash
3939
id: get-issue-number
4040
run: |
41-
num=$(jq -r '.[0].number' <<'EOF'
41+
if num=$(jq -re '.[0].number' <<'EOF'
4242
${{ steps.find-issue.outputs.issues }}
4343
EOF
44-
)
45-
if [ -n "$num" ]; then
44+
); then
45+
echo "Found existing issue #$num"
4646
echo "issue-number=$num" >> $GITHUB_OUTPUT
47+
else
48+
echo "No existing issue found"
4749
fi
4850
4951
- name: Create issue

0 commit comments

Comments
 (0)