mirror of
https://github.com/peter-evans/repository-dispatch.git
synced 2026-07-22 02:27:41 +00:00
Update README
This commit is contained in:
22
README.md
22
README.md
@@ -51,6 +51,28 @@ jobs:
|
|||||||
- run: echo ${{ github.event.client_payload.sha }}
|
- run: echo ${{ github.event.client_payload.sha }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Client payload
|
||||||
|
|
||||||
|
The GitHub API allows a maximum of 10 top-level properties in the `client-payload` JSON.
|
||||||
|
If you use more than that you will see an error message like the following.
|
||||||
|
|
||||||
|
```
|
||||||
|
No more than 10 properties are allowed; 14 were supplied.
|
||||||
|
```
|
||||||
|
|
||||||
|
For example, this payload will fail because it has more than 10 top-level properties.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
client-payload: ${{ toJson(github) }}
|
||||||
|
```
|
||||||
|
|
||||||
|
To solve this you can simply wrap the payload in a single top-level property.
|
||||||
|
The following payload will succeed.
|
||||||
|
|
||||||
|
```yml
|
||||||
|
client-payload: '{"github": ${{ toJson(github) }}}'
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](LICENSE)
|
[MIT](LICENSE)
|
||||||
|
|||||||
Reference in New Issue
Block a user