Skip to content

Commit 1ba8492

Browse files
committed
Clean more
1 parent a082e1e commit 1ba8492

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runs:
3838
content=$DISCUSSION_BODY
3939
discussion_node_id='${{ github.event.discussion.node_id }}'
4040
user=${{ github.event.discussion.user.login }}
41-
target=' your discussion body'
41+
target=" your discussion body"
4242
fi
4343
fi
4444
message="Uh oh! @$user, the image you shared is missing helpful alt text. Check $target.
@@ -47,9 +47,15 @@ runs:
4747
4848
Learn more about alt text at [Basic writing and formatting syntax: images on GitHub Docs](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)."
4949
flag="$(flagAltText "$content")"
50+
51+
echo $flag
52+
echo $type
53+
5054
if [[ $flag = true ]]; then
5155
if [[ $type = pr_comment ]] || [[ $type = pr_description ]]; then
5256
gh pr comment $issue_url --body "$message"
57+
elif [[ $type = issue_comment ]] || [[ $type = issue_description ]]; then
58+
gh issue comment $issue_url --body "$message"
5359
elif [[ $type = discussion_description ]]; then
5460
gh api graphql -F discussionId="$discussion_node_id" -F body="$message" -f query='
5561
mutation($discussionId: ID!, $body: String!) {
@@ -60,8 +66,6 @@ runs:
6066
}
6167
}
6268
'
63-
else
64-
gh issue comment $issue_url --body "$message"
6569
fi
6670
fi
6771
shell: bash

0 commit comments

Comments
 (0)