Skip to content

Commit

Permalink
Add another message when no PRs found
Browse files Browse the repository at this point in the history
  • Loading branch information
noraworld committed Jul 11, 2022
1 parent cd05c40 commit 7985bbb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions main
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,22 @@ pr_list_json() {
}

comment() {
if $DEBUG; then
if ! $DEBUG && [ "$prs" != "" ]; then
gh pr comment "$PR" --body "$(message github)"
elif ! $DEBUG && [ "$prs" = "" ]; then
gh pr comment "$PR" --body "No pull requests to be released."
elif $DEBUG && [ "$prs" != "" ]; then
message github
elif $DEBUG && [ "$prs" = "" ]; then
echo "No pull requests to be released."
else
gh pr comment "$PR" --body "$(message github)"
echo "Error: Something went wrong" >&2
exit 1
fi
}

post_to_slack() {
if [ "$SLACK_CHANNEL" = "" ] || [ "$SLACK_TOKEN" = "" ]; then
if [ "$SLACK_CHANNEL" = "" ] || [ "$SLACK_TOKEN" = "" ] || [ "$prs" = "" ]; then
return
fi

Expand Down

0 comments on commit 7985bbb

Please sign in to comment.