Update documentation
This commit is contained in:
@@ -54,7 +54,7 @@ jobs:
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
integration-test
|
||||
@@ -69,8 +69,8 @@ This action also features [advanced configuration](docs/advanced-configuration.m
|
||||
|
||||
| Input | Description | Default |
|
||||
| --- | --- | --- |
|
||||
| `token` | (**required**) A `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). Note: `GITHUB_TOKEN` *does not* work here. See [token](#token) for further details. | |
|
||||
| `reaction-token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). See [reaction-token](#reaction-token) for further details. | `GITHUB_TOKEN` |
|
||||
| `token` | (**required**) A `repo` scoped [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). Note: `GITHUB_TOKEN` *does not* work here. See [token](#token) for further details. | |
|
||||
| `reaction-token` | `GITHUB_TOKEN` or a `repo` scoped [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). See [reaction-token](#reaction-token) for further details. | `GITHUB_TOKEN` |
|
||||
| `reactions` | Add reactions. :eyes: = seen, :rocket: = dispatched | `true` |
|
||||
| `commands` | (**required**) A comma or newline separated list of commands. | |
|
||||
| `permission` | The repository permission level required by the user to dispatch commands. (`none`, `read`, `write`, `admin`) | `write` |
|
||||
@@ -99,8 +99,8 @@ You can use a [PAT](https://help.github.com/en/github/authenticating-to-github/c
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
reaction-token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
reaction-token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
integration-test
|
||||
@@ -162,7 +162,7 @@ To demonstrate, take the following configuration as an example.
|
||||
```yml
|
||||
- uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
static-args: |
|
||||
@@ -232,7 +232,7 @@ The simplest response is to add a :tada: reaction to the comment.
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
@@ -248,7 +248,7 @@ Another option is to reply with a new comment containing a link to the run outpu
|
||||
- name: Create comment
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
|
||||
body: |
|
||||
|
||||
@@ -10,7 +10,7 @@ For example, the following basic configuration means that all commands must have
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
integration-test
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
config: >
|
||||
[
|
||||
{
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
config-from-file: .github/slash-command-dispatch.json
|
||||
```
|
||||
|
||||
@@ -96,8 +96,8 @@ Advanced configuration requires a combination of yaml based inputs and JSON conf
|
||||
|
||||
| Input | JSON Property | Description | Default |
|
||||
| --- | --- | --- | --- |
|
||||
| `token` | | (**required**) A `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). Note: `GITHUB_TOKEN` *does not* work here. See [token](https://github.com/peter-evans/slash-command-dispatch#token) for further details. | |
|
||||
| `reaction-token` | | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). See [reaction-token](https://github.com/peter-evans/slash-command-dispatch#reaction-token) for further details. | `GITHUB_TOKEN` |
|
||||
| `token` | | (**required**) A `repo` scoped [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). Note: `GITHUB_TOKEN` *does not* work here. See [token](https://github.com/peter-evans/slash-command-dispatch#token) for further details. | |
|
||||
| `reaction-token` | | `GITHUB_TOKEN` or a `repo` scoped [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). See [reaction-token](https://github.com/peter-evans/slash-command-dispatch#reaction-token) for further details. | `GITHUB_TOKEN` |
|
||||
| `reactions` | | Add reactions. :eyes: = seen, :rocket: = dispatched | `true` |
|
||||
| | `command` | (**required**) The slash command. | |
|
||||
| | `permission` | The repository permission level required by the user to dispatch the command. (`none`, `read`, `write`, `admin`) | `write` |
|
||||
|
||||
+14
-14
@@ -15,7 +15,7 @@ This is pattern for a slash command where a named argument specifies the branch
|
||||
/do-something branch=develop
|
||||
```
|
||||
|
||||
In the following command workflow, `REPO_ACCESS_TOKEN` is a `repo` scoped [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
|
||||
In the following command workflow, `PAT` is a `repo` scoped [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
|
||||
|
||||
```yml
|
||||
name: do-something-command
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
# Checkout the branch to test
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
ref: ${{ steps.vars.outputs.branch }}
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
# Checkout the branch to test
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
ref: ${{ steps.vars.outputs.branch }}
|
||||
|
||||
@@ -113,7 +113,7 @@ jobs:
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
@@ -129,7 +129,7 @@ This is pattern for a slash command used in pull request comments. It checks out
|
||||
|
||||
In the dispatch configuration for this command pattern, `issue-type` should be set to `pull-request`. This will prevent it from being dispatched from regular issue comments where it will fail.
|
||||
|
||||
In the following command workflow, `REPO_ACCESS_TOKEN` is a `repo` scoped [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
|
||||
In the following command workflow, `PAT` is a `repo` scoped [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
|
||||
|
||||
```yml
|
||||
name: fix-pr-command
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
# Checkout the pull request branch
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.client_payload.pull_request.head.ref }}
|
||||
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
- name: Checkout pull request
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.client_payload.pull_request.head.ref }}
|
||||
fetch-depth: 0
|
||||
@@ -198,7 +198,7 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name '${{ github.event.client_payload.github.actor }}'
|
||||
git config --global user.email '${{ github.event.client_payload.github.actor }}@users.noreply.github.com'
|
||||
git remote add base https://x-access-token:${{ secrets.REPO_ACCESS_TOKEN }}@github.com/${{ github.event.client_payload.pull_request.base.repo.full_name }}.git
|
||||
git remote add base https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.event.client_payload.pull_request.base.repo.full_name }}.git
|
||||
git fetch base ${{ github.event.client_payload.pull_request.base.ref }}
|
||||
git rebase base/${{ github.event.client_payload.pull_request.base.ref }}
|
||||
git push --force-with-lease
|
||||
@@ -206,7 +206,7 @@ jobs:
|
||||
- name: Update comment
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
body: |
|
||||
@@ -220,7 +220,7 @@ jobs:
|
||||
- name: Update comment
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
body: |
|
||||
@@ -250,7 +250,7 @@ jobs:
|
||||
# Checkout the pull request branch
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.client_payload.pull_request.head.ref }}
|
||||
|
||||
@@ -279,7 +279,7 @@ jobs:
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
|
||||
@@ -21,7 +21,7 @@ Follow this guide to get started with a working `/example` command.
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
|
||||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
|
||||
reaction-type: hooray
|
||||
@@ -31,7 +31,7 @@ Follow this guide to get started with a working `/example` command.
|
||||
|
||||
4. Go to your repository `Settings` -> `Secrets` and `Add a new secret`.
|
||||
|
||||
**Name**: `REPO_ACCESS_TOKEN`
|
||||
**Name**: `PAT`
|
||||
|
||||
**Value**: (The PAT created in step 3)
|
||||
|
||||
@@ -58,7 +58,7 @@ Command processing setup is complete! Now we need to setup command dispatch for
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: example
|
||||
repository: your-github-username/slash-command-processor
|
||||
```
|
||||
@@ -67,7 +67,7 @@ Command processing setup is complete! Now we need to setup command dispatch for
|
||||
|
||||
3. Go to your repository `Settings` -> `Secrets` and `Add a new secret`.
|
||||
|
||||
**Name**: `REPO_ACCESS_TOKEN`
|
||||
**Name**: `PAT`
|
||||
|
||||
**Value**: (The PAT created in step 2)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: Slash Command Dispatch
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
integration-test
|
||||
@@ -85,7 +85,7 @@ The simplest response is to add a :tada: reaction to the comment.
|
||||
- name: Add reaction
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
repository: ${{ github.event.inputs.repository }}
|
||||
comment-id: ${{ github.event.inputs.comment-id }}
|
||||
reaction-type: hooray
|
||||
@@ -107,7 +107,7 @@ The `error-message` output can be used to provide feedback to the user as follow
|
||||
id: scd
|
||||
uses: peter-evans/slash-command-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
token: ${{ secrets.PAT }}
|
||||
commands: |
|
||||
deploy
|
||||
integration-test
|
||||
|
||||
Reference in New Issue
Block a user