From be587eca03087731d62d444106cec3d26b9fe83d Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Tue, 17 Dec 2024 23:19:36 +0000 Subject: [PATCH 1/2] Updated slackdiff document to highlight channel id is required --- docs/Hooks.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/Hooks.md b/docs/Hooks.md index 4e5285b96..392429714 100644 --- a/docs/Hooks.md +++ b/docs/Hooks.md @@ -259,13 +259,15 @@ gem install slack-ruby-client ### slackdiff hook configuration example +> Please note that 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. @@ -278,12 +280,12 @@ 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. +Note the channel ID must be in quotes. A proxy can optionally be specified if needed to reach the Slack API endpoint. @@ -293,7 +295,7 @@ hooks: type: slackdiff events: [post_store] token: SLACK_BOT_TOKEN - channel: "#network-changes" + channel: "#CHANNEL_ID" proxy: http://myproxy:8080 ``` From c8d61239bc3ba657554bdca0cc57884ba125acc3 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Wed, 18 Dec 2024 00:29:25 +0000 Subject: [PATCH 2/2] Update Hooks.md --- docs/Hooks.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/Hooks.md b/docs/Hooks.md index 392429714..a206339c4 100644 --- a/docs/Hooks.md +++ b/docs/Hooks.md @@ -259,7 +259,7 @@ gem install slack-ruby-client ### slackdiff hook configuration example -> Please note that channel needs to be your Slack channel ID. +> Please note that the channel needs to be your Slack channel ID. ```yaml hooks: @@ -285,8 +285,6 @@ hooks: message: "%{node} %{group} %{model} updated https://git.intranet/network-changes/commit/%{commitref}" ``` -Note the channel ID must be in quotes. - A proxy can optionally be specified if needed to reach the Slack API endpoint. ```yaml