Skip to content

Commit

Permalink
Merge pull request #3350 from config-services/slack-diff-docs
Browse files Browse the repository at this point in the history
Updated slackdiff document to highlight channel id is required
  • Loading branch information
robertcheramy authored Dec 19, 2024
2 parents 7169b7e + c8d6123 commit 7cfa1ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/Hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@ gem install slack-ruby-client

### slackdiff hook configuration example

> Please note that the channel needs to be your Slack channel ID.

```yaml
hooks:
slack:
type: slackdiff
events: [post_store]
token: SLACK_BOT_TOKEN
channel: "#network-changes"
channel: "CHANNEL_ID"
```

The token parameter is a Slack API token that can be generated following [this tutorial](https://api.slack.com/tutorials/tracks/getting-a-token). Until Slack stops supporting them, legacy tokens can also be used.
Expand All @@ -278,13 +280,11 @@ hooks:
type: slackdiff
events: [post_store]
token: SLACK_BOT_TOKEN
channel: "#network-changes"
channel: "CHANNEL_ID"
diff: false
message: "%{node} %{group} %{model} updated https://git.intranet/network-changes/commit/%{commitref}"
```

Note the channel name must be in quotes.

A proxy can optionally be specified if needed to reach the Slack API endpoint.

```yaml
Expand All @@ -293,7 +293,7 @@ hooks:
type: slackdiff
events: [post_store]
token: SLACK_BOT_TOKEN
channel: "#network-changes"
channel: "#CHANNEL_ID"
proxy: http://myproxy:8080
```

Expand Down

0 comments on commit 7cfa1ae

Please sign in to comment.