GoogleCloudPlatform / GoogleCloudPlatform/cloud-build-notifiers

[SLACK] color side bar is not working in notification messages

Open
#156 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
157
Forks
144
Avg merge
1h 34m
Merged PRs (30d)
1

Description

Currently (1.15.0 or higher), the color sidebar is not working.
The "color" is only available for an element in attachments.
But, now, "blocks" is placed outside of "attachments".

So, to get the side color bar, we should change the position of the "blocks".

```diff
- return &slack.WebhookMessage{Attachments: []slack.Attachment{{Color: clr}}, Blocks: &blocks}, nil
+ return &slack.WebhookMessage{Attachments: []slack.Attachment{{Color: clr, Blocks: &blocks}}}, nil
```

But, the `attachments` field is not recommended.
ref: https://api.slack.com/reference/messaging/payload

I cannot find a way to add a color side bar in Block Kit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.