Skip to content

Commit 43604b7

Browse files
authored
docs(fix): reference octokit context and github event webhook payloads in variables (#348)
1 parent 2c86117 commit 43604b7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44

55
Send data into Slack using this GitHub Action!
66

7+
## Example Workflows
8+
9+
For examples on how to leverage this in your workflows, check out the [example workflows we have](https://github.com/slackapi/slack-github-action/tree/main/example-workflows).
10+
711
## Sending Variables
812

9-
You can send GitHub-specific data related to GitHub Action workflow events using [GitHub Contexts](https://docs.github.com/en/actions/learn-github-actions/contexts) and [Variables](https://docs.github.com/en/actions/learn-github-actions/variables) that GitHub Actions provides.
13+
You can provide data to send with this GitHub Action from various sources:
1014

11-
For examples on how to leverage this in your workflows, check out the [example workflows we have](https://github.com/slackapi/slack-github-action/tree/main/example-workflows).
15+
* The default event [context][event-context] with a [payload][event-payload] matching the GitHub event.
16+
* A custom JSON payload with optional [variables][variables] provided in the GitHub Action step.
17+
18+
The custom payload can be provided inline in your GitHub workflow or from a file, [detailed with technique 1](#technique-1-slack-workflow-builder), and will be used instead of the default event context if included.
1219

1320
## How to Send Data to Slack
1421

@@ -312,7 +319,10 @@ See [CONTRIBUTING](.github/contributing.md).
312319

313320
See [LICENSE](LICENSE).
314321

322+
[apps]: https://api.slack.com/apps
315323
[create-webhook]: https://slack.com/intl/en-ca/help/articles/360041352714-Create-more-advanced-workflows-using-webhooks
324+
[event-context]: https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts#L6
325+
[event-payload]: https://docs.github.com/en/webhooks/webhook-events-and-payloads
316326
[job-step]: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps
317327
[repo-secret]: https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository
318-
[apps]: https://api.slack.com/apps
328+
[variables]: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables

0 commit comments

Comments
 (0)