Add disclaimer to example usages

This commit is contained in:
Adam Millerchip 2020-10-17 22:09:12 +09:00
parent 9420e9b4ee
commit 3fee73d305
3 changed files with 24 additions and 12 deletions

View File

@ -4,8 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## Unreleased
- Releases 0.0.2 and 0.0.3 contained no functional changes and were [attempts to avoid the example usages getting reformatted by the Orb Repository](https://discuss.circleci.com/t/orb-example-formatting-gets-mangled-after-publishing/37816).
## [0.0.4] - 2020-10-17
- Releases [0.0.2] and [0.0.3] contained no functional changes and were [attempts to avoid the example usages getting reformatted by the Orb Repository](https://discuss.circleci.com/t/orb-example-formatting-gets-mangled-after-publishing/37816).
- Add a note to the example usages explaining that it's clearer to check the source.
## [0.0.1] - 2020-10-17 ## [0.0.1] - 2020-10-17
- Initial Release - Initial Release

View File

@ -4,7 +4,7 @@
## Usage Examples ## Usage Examples
See the usage examples on the orb's [CircleCI Orb Repository listing](https://circleci.com/developer/orbs/orb/adamu/slack-webhook). See the usage examples on the orb's [CircleCI Orb Repository listing](https://circleci.com/developer/orbs/orb/adamu/slack-webhook#usage-examples).
## Changelog ## Changelog

View File

@ -2,7 +2,6 @@ version: 2.1
description: | description: |
A simple orb to send fully-customized Slack messages via Slack webhooks. A simple orb to send fully-customized Slack messages via Slack webhooks.
To generate a webhook URL, please see the Slack instructions: https://api.slack.com/messaging/webhooks
display: display:
source_url: "https://github.com/adamu/slack-webhook-orb" source_url: "https://github.com/adamu/slack-webhook-orb"
@ -51,10 +50,14 @@ examples:
webhook-url: webhook-url:
description: | description: |
Provide the webhook URL directly in the webhook-url parameter. Provide the webhook URL directly in the webhook-url parameter.
Note that this leaks the Webhook URL in your CircleCI config and the CircleCI logs,
so using one of the environment variable option is preferred. Note that this leaks the Webhook URL in your CircleCI config and the CircleCI logs - using one of the environment variable options below is recommended.
Provide the Slack JSON payload in the json-payload parameter.
The payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder To generate a webhook URL, please see the Slack instructions: https://api.slack.com/messaging/webhooks
The json payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder
Unfortunately the json payload example below is reformatted by the CircleCI documentation generator. Please check the original in the Orb Source at the bottom of the page for an easier to read example.
usage: usage:
version: 2.1 version: 2.1
@ -82,9 +85,13 @@ examples:
} }
environment-variable: environment-variable:
description: | description: |
Provide the webhook URL in the SLACK_WEBHOOK environment variable on CircleCI. Set the webhook URL in the SLACK_WEBHOOK environment variable on CircleCI.
When using this method, only the json-payload parameter needs to be supplied. When using this method, only the json-payload parameter needs to be supplied.
To generate a webhook URL, please see the Slack instructions: https://api.slack.com/messaging/webhooks
The payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder The payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder
Unfortunately the json payload example below is reformatted by the CircleCI documentation generator. Please check the original in the Orb Source at the bottom of the page for an easier to read example.
usage: usage:
version: 2.1 version: 2.1
@ -111,10 +118,12 @@ examples:
} }
custom-environment-variable: custom-environment-variable:
description: | description: |
Supply the webhook URL in a custom environment variable configured on CircleCI, Set the webhook URL in a custom environment variable configured on CircleCI, and provide the name of the environment variable in the webhook-url-env-var parameter.
and provide the name of the environment variable in the webhook-url-env-var parameter.
Provide the Slack JSON payload in the json-payload parameter. To generate a webhook URL, please see the Slack instructions: https://api.slack.com/messaging/webhooks
The payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder The payload can be generated with the Slack Block Kit Builder: https://app.slack.com/block-kit-builder
Unfortunately the json payload example below is reformatted by the CircleCI documentation generator. Please check the original in the Orb Source at the bottom of the page for an easier to read example.
usage: usage:
version: 2.1 version: 2.1