diff --git a/action.yml b/action.yml index c52ca31..b2d315a 100644 --- a/action.yml +++ b/action.yml @@ -19,6 +19,10 @@ inputs: description: "Fail the action (i.e. show the action run as red) if the command is not found in the comments from someone in the approver team" required: true default: 'false' + post-successful-approval-comment: + description: "Boolean whether to post successful approval comment" + required: true + default: 'true' successful-approval-comment: description: "Comment to post if there is an approval is found" required: true @@ -81,7 +85,7 @@ runs: :cry: No one approved your run yet! Have someone from the @${{ github.repository_owner }}/${{ inputs.team-name }} team run `/approve` and then try your command again :no_entry_sign: :no_entry: Marking the workflow run as failed - - if: ${{ steps.check-approval.outputs.approved == 'true' }} + - if: ${{ steps.check-approval.outputs.approved == 'true' && inputs.post-successful-approval-comment == 'true' }} name: Create completed comment uses: peter-evans/create-or-update-comment@v1 with: