-
Notifications
You must be signed in to change notification settings - Fork 189
docs: streamlines doc structure #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,78 +1,15 @@ | ||
| [ | ||
| { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/slack-github-action", | ||
| "label": "Slack GitHub Action", | ||
| "className": "sidebar-title" | ||
| }, | ||
| { "type": "html", "value": "<hr>" }, | ||
| "tools/slack-github-action/sending-variables", | ||
| { | ||
| "type": "category", | ||
| "label": "Sending techniques", | ||
| "collapsed": false, | ||
| "link": { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/sending-techniques/sending-techniques" | ||
| }, | ||
| "items": [ | ||
| "tools/slack-github-action/sending-techniques/sending-techniques", | ||
| { | ||
| "type": "category", | ||
| "label": "Sending data via a webhook to start a Slack workflow", | ||
| "link": { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow/sending-data-webhook-slack-workflow" | ||
| }, | ||
| "items": [ | ||
| "tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow/sending-data-webhook-slack-workflow", | ||
| "tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow/format-generated-files", | ||
| "tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow/post-release-announcements", | ||
| "tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow/update-a-channel-topic" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "category", | ||
| "label": "Sending data using a Slack API method", | ||
| "link": { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/sending-techniques/sending-data-slack-api-method/sending-data-slack-api-method" | ||
| }, | ||
| "items": [ | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-api-method/sending-data-slack-api-method", | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-api-method/direct-message-author", | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-api-method/invite-usergroup-to-channel" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "category", | ||
| "label": "Sending data as a message with a Slack incoming webhook URL", | ||
| "link": { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/sending-techniques/sending-data-slack-incoming-webhook/sending-data-slack-incoming-webhook" | ||
| }, | ||
| "items": [ | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-incoming-webhook/sending-data-slack-incoming-webhook", | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-incoming-webhook/post-inline-text-message", | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-incoming-webhook/post-inline-block-message", | ||
| "tools/slack-github-action/sending-techniques/sending-data-slack-incoming-webhook/post-blocks-found-in-file" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "category", | ||
| "label": "Running Slack CLI commands", | ||
| "link": { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/sending-techniques/running-slack-cli-commands/running-slack-cli-commands" | ||
| }, | ||
| "items": [ | ||
| "tools/slack-github-action/sending-techniques/running-slack-cli-commands/running-slack-cli-commands", | ||
| "tools/slack-github-action/sending-techniques/running-slack-cli-commands/deploy-an-app", | ||
| "tools/slack-github-action/sending-techniques/running-slack-cli-commands/validate-a-manifest", | ||
| "tools/slack-github-action/sending-techniques/running-slack-cli-commands/manage-collaborators" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "tools/slack-github-action/additional-configurations" | ||
| ] | ||
| { | ||
| "type": "doc", | ||
| "id": "tools/slack-github-action/slack-github-action", | ||
| "label": "Slack GitHub Action", | ||
| "className": "sidebar-title" | ||
| }, | ||
| { "type": "html", "value": "<hr>" }, | ||
| "tools/slack-github-action/gathering-variables", | ||
| "tools/slack-github-action/sending-data-webhook-slack-workflow", | ||
| "tools/slack-github-action/sending-data-slack-api-method", | ||
| "tools/slack-github-action/sending-data-slack-incoming-webhook", | ||
| "tools/slack-github-action/running-slack-cli-commands", | ||
| "tools/slack-github-action/additional-configurations" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,23 +21,6 @@ The `errors` option defaults to `false` so failed requests do not cause the step | |
|
|
||
| Invalid inputs to the GitHub Action, such as not including a payload, will always cause the GitHub step to fail. | ||
|
|
||
| ## Flattening nested payloads | ||
|
|
||
| Variables and data provided in the payload might contain nested fields that need to be flattened before being sent with a [webhook trigger](/tools/slack-github-action/sending-techniques/sending-data-webhook-slack-workflow) to match the expected input format of [Workflow Builder](https://slack.com/features/workflow-automation). | ||
|
|
||
| The `payload-delimiter` option will flatten the input payload using the provided delimiter and will also make values stringified: | ||
|
|
||
| ```yaml | ||
| - name: Flatten the default GitHub payload | ||
| uses: slackapi/[email protected] | ||
| with: | ||
| payload-delimiter: "_" | ||
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| webhook-type: webhook-trigger | ||
| ``` | ||
|
|
||
| Reference to the flattening implementation is available for exploration from within the [`flat`](https://www.npmjs.com/package/flat) package. | ||
|
|
||
| ## Parsing templated variables | ||
|
|
||
| Additional variables provided in the GitHub event [context](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts#L6) and event [payload](https://docs.github.com/en/webhooks/webhook-events-and-payloads) can be used to replace templated variables in the input payload with the `payload-templated` option: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧮 praise: Nice catch of what's accomplished here!