Skip to content

Commit

Permalink
docs: table for inputs in readme
Browse files Browse the repository at this point in the history
closes #25
  • Loading branch information
joshjohanning committed Dec 3, 2023
1 parent 91cb94b commit edea4fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
if: contains(github.event.comment.body, '/do-stuff')

steps:
# get the app's installation token
- uses: actions/create-github-app-token@v1
id: app-token
with:
Expand All @@ -29,14 +28,24 @@ jobs:
uses: joshjohanning/approveops@v2
id: check-approval
with:
token: ${{ steps.app-token.outputs.token }} # use a github app token or a PAT
approve-command: '/approve' # defaults to '/approve', the command to look for in the comments
team-name: 'approver-team' # the name of the team in GitHub to check for the approval command; e.g.: approver-team
fail-if-approval-not-found: true # defaults to true, fail the action (show the action run as red) if the command is not found in the comments from someone in the approver team"
post-successful-approval-comment: false # defaults to true, whether to post successful approval comment
successful-approval-comment: ':tada: You were able to run the workflow because someone left an approval in the comments!! :tada:' # Optional, only if post-successful-approval-comment is true, comment to post if an approval is found
token: ${{ steps.app-token.outputs.token }}
approve-command: '/approve'
team-name: 'approver-team'
fail-if-approval-not-found: true
post-successful-approval-comment: false
```
### Inputs
| Name | Description | Required | Default |
| --- | --- | --- | --- |
| `token` | GitHub App installation token or PAT that has access to read+write comments and list the team's membership | `true` | `''` |
| `approve-command` | The approval command to look for in the comments | `true` | `/approve` |
| `team-name` | The name of the team in GitHub to check for the approval command, e.g. `approver-team` | `true` | `''` |
| `fail-if-approval-not-found` | Fail the action (show the action run as red) if the command is not found in the comments from someone in the approver team | `true` | `true` |
| `post-successful-approval-comment` | Whether to post successful approval comment | `true` | `true` |
| `successful-approval-comment` | Comment to post if an approval is found | `true` | `':tada: You were able to run the workflow because someone left an approval in the comments!!'` |

## Prerequisites

### Team and Authentication
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
successful-approval-comment:
description: "Comment to post if an approval is found"
required: true
default: ":tada: You were able to run the workflow because someone left an approval in the comments!! :tada:"
default: ":tada: You were able to run the workflow because someone left an approval in the comments!!"

outputs:
approved:
Expand Down

0 comments on commit edea4fd

Please sign in to comment.