From db9b8b7d0c63bbd5bd4580e62bee318669f3da1b Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 4 Aug 2020 15:55:41 +0900 Subject: [PATCH] Update documentation --- README.md | 14 +++++++------- docs/advanced-configuration.md | 4 ++-- docs/examples.md | 4 ++-- docs/getting-started.md | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index edeb7eb..a784f99 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ This action also features [advanced configuration](docs/advanced-configuration.m | Input | Description | Default | | --- | --- | --- | -| `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` | +| `token` | (**required**) A `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). 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://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). 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. See [permission](#permission) for further details. (`none`, `read`, `triage`, `write`, `maintain`, `admin`) | `write` | @@ -87,15 +87,15 @@ This action also features [advanced configuration](docs/advanced-configuration.m #### `token` -This action creates [repository_dispatch](https://developer.github.com/v3/repos/#create-a-repository-dispatch-event) and [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) events. -The default `GITHUB_TOKEN` does not have scopes to create these events, so a `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) is required. +This action creates [repository_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch) and [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) events. +The default `GITHUB_TOKEN` does not have scopes to create these events, so a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) is required. If you will be dispatching commands to public repositories *only* then you can use the more limited `public_repo` scope. #### `reaction-token` If you don't specify a token for `reaction-token` it will use the default `GITHUB_TOKEN`. Reactions to comments will then be made by the @github-actions bot user. -You can use a [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) if you would prefer reactions to be made by the user account associated with the PAT. +You can use a [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) if you would prefer reactions to be made by the user account associated with the PAT. ```yml - name: Slash Command Dispatch @@ -122,7 +122,7 @@ For repositories owned by a user account there are only two permission levels, t #### `dispatch-type` -By default, the action creates [repository_dispatch](https://developer.github.com/v3/repos/#create-a-repository-dispatch-event) events. +By default, the action creates [repository_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch) events. Setting `dispatch-type` to `workflow` will instead create [workflow_dispatch](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) events. There are significant differences in the action's behaviour when using `workflow` dispatch. See [workflow dispatch](docs/workflow-dispatch.md) for usage details. @@ -223,7 +223,7 @@ The properties in the `slash_command` context from the above example can be used #### `github` and `pull_request` contexts The payload contains the `github` context of the `issue_comment` event at path `github.event.client_payload.github`. -Additionally, if the comment was made in a pull request, the action calls the [GitHub API to fetch the pull request detail](https://developer.github.com/v3/pulls/#get-a-single-pull-request) and attach it to the payload at path `github.event.client_payload.pull_request`. +Additionally, if the comment was made in a pull request, the action calls the [GitHub API to fetch the pull request detail](https://docs.github.com/en/rest/reference/pulls#get-a-pull-request) and attach it to the payload at path `github.event.client_payload.pull_request`. You can inspect the payload with the following step. ```yml diff --git a/docs/advanced-configuration.md b/docs/advanced-configuration.md index c509283..d625558 100644 --- a/docs/advanced-configuration.md +++ b/docs/advanced-configuration.md @@ -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 [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` | +| `token` | | (**required**) A `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). 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://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). 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`, `triage`, `write`, `maintain`, `admin`) | `write` | diff --git a/docs/examples.md b/docs/examples.md index dafff56..fefd7d3 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -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, `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). +In the following command workflow, `PAT` is a `repo` scoped [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). ```yml name: do-something-command @@ -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, `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). +In the following command workflow, `PAT` is a `repo` scoped [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). ```yml name: fix-pr-command diff --git a/docs/getting-started.md b/docs/getting-started.md index ca132e0..509f3ce 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -27,7 +27,7 @@ Follow this guide to get started with a working `/example` command. reaction-type: hooray ``` -3. Create a `repo` scoped Personal Access Token (PAT) by following [this guide](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). +3. Create a `repo` scoped Personal Access Token (PAT) by following [this guide](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). 4. Go to your repository `Settings` -> `Secrets` and `Add a new secret`. @@ -63,7 +63,7 @@ Command processing setup is complete! Now we need to setup command dispatch for repository: your-github-username/slash-command-processor ``` -2. Create a new `repo` scoped [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line), OR, use the one created at step 3 of the [previous section](#command-processing-setup). +2. Create a new `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token), OR, use the one created at step 3 of the [previous section](#command-processing-setup). 3. Go to your repository `Settings` -> `Secrets` and `Add a new secret`.