Skip to content

Commit

Permalink
Merge pull request #33 from homoluctus/releases/v1
Browse files Browse the repository at this point in the history
Remove default args for username and icon_emoji
  • Loading branch information
homoluctus authored Sep 16, 2019
2 parents 2c15f23 + cdcc15d commit 0bc97f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ You can customize the following parameters:
|type|required|N/A|The result of GitHub Actions job<br>This parameter value must contain `success`, `fail` or `cancel`<br>We recommend using ${{ job.status }}|
|job_name|required|N/A|Means slack notification title|
|url|required|N/A|Slack Incoming Webhooks URL<br>Please specify this key or SLACK_WEBHOOK environment variable<br>※SLACK_WEBHOOK will be deprecated|
|icon_emoji|optional|github|Slack icon|
|username|optional|Github Actions|Slack username|
|icon_emoji|optional|Use Slack Incoming Webhook configuration|Slack icon|
|username|optional|Use Slack Incoming Webhook configuration|Slack username|
|channel|optional|Use Slack Incoming Webhook configuration|Slack channel name|

Please refer `action.yml` for more details.
Expand All @@ -42,19 +42,19 @@ Please refer `action.yml` for more details.
# Slack UI Example
## Success Case

<img src="./images/github_actions_success.png" alt="github actions success pattern">
<img src="./images/github_actions_success.png" alt="github actions success pattern" width="70%">

## Failure Case

<img src="./images/github_actions_failure.png" alt="github actions failure pattern">
<img src="./images/github_actions_failure.png" alt="github actions failure pattern" width="70%">

## Cancel Case

<img src="./images/github_actions_cancel.png" alt="github actions cancel pattern">
<img src="./images/github_actions_cancel.png" alt="github actions cancel pattern" width="70%">

## Preview

<img src="./images/preview.png" alt="Notification Preview">
<img src="./images/preview.png" alt="Notification Preview" width="70%">

# Contribute
1. Fork this repository
Expand Down
2 changes: 0 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ inputs:
username:
description: 'slack username'
required: false
default: 'Github Actions'
icon_emoji:
description: 'slack icon emoji'
required: false
default: 'github'
channel:
description: 'slack channel'
required: false
Expand Down
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function run() {
try {
const type = core.getInput('type', { required: true });
const job_name = core.getInput('job_name', { required: true });
const username = core.getInput('username') || 'Github Actions';
const icon_emoji = core.getInput('icon_emoji') || 'github';
const username = core.getInput('username');
const icon_emoji = core.getInput('icon_emoji');
const channel = core.getInput('channel');
const url = core.getInput('url') || process.env.SLACK_WEBHOOK || '';
if (url === '') {
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ async function run() {
try {
const type: string = core.getInput('type', { required: true });
const job_name: string = core.getInput('job_name', { required: true });
const username: string = core.getInput('username') || 'Github Actions';
const icon_emoji: string = core.getInput('icon_emoji') || 'github';
const username: string = core.getInput('username');
const icon_emoji: string = core.getInput('icon_emoji');
const channel: string = core.getInput('channel');
const url: string = core.getInput('url') || process.env.SLACK_WEBHOOK || '';

Expand Down

0 comments on commit 0bc97f8

Please sign in to comment.