Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Oct 19, 2022
1 parent 66463e4 commit 2f6d32c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A GitHub action to create a repository dispatch event.

## Usage

Dispatch to the current repository by elivating the permissions of the default `GITHUB_TOKEN`.
Dispatch an event to the current repository by elivating the permissions of the default `GITHUB_TOKEN`.
```yml
permissions:
actions: write
Expand All @@ -21,7 +21,7 @@ jobs:
event-type: my-event
```
Dispatch to a remote repository using a `repo` scoped GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
Dispatch an event to a remote repository using a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
```yml
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
Expand All @@ -39,9 +39,9 @@ Dispatch to a remote repository using a `repo` scoped GitHub [Personal Access To
| `event-type` | (**required**) A custom webhook event name. | |
| `client-payload` | JSON payload with extra information about the webhook event that your action or workflow may use. | `{}` |

#### `token`
#### Token

This action creates [`repository_dispatch`](https://developer.github.com/v3/repos/#create-a-repository-dispatch-event) events.
This action creates [`repository_dispatch`](https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event) events.
The default `GITHUB_TOKEN` token can only be used if you are dispatching the same repository that the workflow is executing in.
In this case you must [elevate the token permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) to allow the dispatch.

Expand Down

0 comments on commit 2f6d32c

Please sign in to comment.