Skip to content

Commit

Permalink
Add Warnings documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tiloio committed Nov 19, 2020
1 parent d93ba39 commit 43c1cc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const gitHubEvents = () => JSON.parse(fs.readFileSync(eventPath, 'utf8'));
const commitMessage = () => {
const event = gitHubEvents();
if (!event || !event.commits || !event.commits.length > 0) {
core.warning('No commit message found in Event:\n' + JSON.stringify(event));
core.warning('No commit message found in Event!\n' + JSON.stringify(event));
return '[[no-commit-message-found!]]';
}
return event.commits[event.commits.length - 1].message
Expand Down
14 changes: 14 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@ Do not forget to add your secret and your custom Slack Block Kit JSON:

Your [Incoming WebHook](https://api.slack.com/messaging/webhooks) URL `slack_web_hook_url` is not valid.

## Warnings

### Could not get slack mention mapping!

Your `slack_mention_mapping_file` path is wrong or content is not JSON.

### No commit message found in Event!

The GitHub Event has no commit which could be displayed. The content of the file should be:

> The path of the file with the complete webhook event payload. For example, /github/workflow/event.json.
More information in the [GitHub Actions Docs](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables) under environment variable `GITHUB_EVENT_PATH`.

# License

Licensed under [MIT](./LICENSE).

0 comments on commit 43c1cc9

Please sign in to comment.