Skip to content

Commit

Permalink
chore: Don't fail discord notification when PR has no comment (#1026)
Browse files Browse the repository at this point in the history
Example PR: #1025

I have to put title in the message if body is null because Github
Action doesn't allow string literal in the expression
  • Loading branch information
chubei authored Feb 24, 2023
1 parent bb725c2 commit 1280899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pulls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
"fields": [
{ "name": "Pull Request", "value": "[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})" },
{ "name": "Repository", "value": "[getdozer/dozer](https://github.com/getdozer/dozer)" },
{ "name": "Message", "value": ${{ toJSON(github.event.pull_request.body) }}}
{ "name": "Message", "value": ${{ toJSON(github.event.pull_request.body || github.event.pull_request.title) }}}
],
"color": 990099
}]'
Expand Down

0 comments on commit 1280899

Please sign in to comment.