Skip to content

Commit c4d5d19

Browse files
committed
add success_reaction and failed_reaction inputs
1 parent 44f1121 commit c4d5d19

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ As seen above, we have a single example step. Perhaps you would actually use a r
185185
| `github_token` | `true` | `${{ github.token }}` | The GitHub token used to create an authenticated client - Provided for you by default! |
186186
| `status` | `true` | `${{ job.status }}` | The status of the GitHub Actions - For use in the post run workflow - Provided for you by default! |
187187
| `reaction` | `true` | `eyes` | If set, the specified emoji "reaction" is put on the comment to indicate that the trigger was detected. For example, "rocket" or "eyes" |
188+
| `success_reaction` | `true` | `+1` | The reaction to add to the comment that triggered the Action if its execution was successful |
189+
| `failure_reaction` | `true` | `-1` | The reaction to add to the comment that triggered the Action if its execution failed |
188190
| `allowed_contexts` | `true` | `pull_request` | A comma separated list of comment contexts that are allowed to trigger this IssueOps command. Pull requests and issues are the only currently supported contexts. To allow IssueOps commands to be invoked from both PRs and issues, set this option to the following: `"pull_request,issue"`. By default, the only place this Action will allow IssueOps commands from is pull requests |
189191
| `permissions` | `true` | `"write,maintain,admin"` | The allowed GitHub permissions an actor can have to invoke IssueOps commands |
190192
| `allow_drafts` | `true` | `"false"` | Whether or not to allow this IssueOps command to be run on draft pull requests |

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ inputs:
2020
description: 'If set, the specified emoji "reaction" is put on the comment to indicate that the trigger was detected. For example, "rocket" or "eyes"'
2121
required: true
2222
default: "eyes"
23+
success_reaction:
24+
description: 'The reaction to add to the comment that triggered the Action if its execution was successful'
25+
required: true
26+
default: "+1"
27+
failure_reaction:
28+
description: 'The reaction to add to the comment that triggered the Action if its execution failed'
29+
required: true
30+
default: "-1"
2331
allowed_contexts:
2432
description: 'A comma separated list of comment contexts that are allowed to trigger this IssueOps command. Pull requests and issues are the only currently supported contexts'
2533
required: true

dist/index.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/functions/post.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export async function post() {
5454
// Otherwise, add a thumbs down reaction
5555
var reaction
5656
if (success) {
57-
reaction = core.getInput('reaction') || thumbsUp
57+
reaction = core.getInput('success_reaction') || thumbsUp
5858
} else {
59-
reaction = thumbsDown
59+
reaction = core.getInput('failed_reaction') || thumbsDown
6060
}
6161

6262
// Update the reactions on the command comment

0 commit comments

Comments
 (0)