Skip to content

Commit

Permalink
feedback: show full clickable URL in Slack messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kimtore committed Sep 23, 2024
1 parent 0bc4a23 commit e9ecaff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/slack/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func (s *Slack) GetFeedbackMessageOptions(ctx context.Context, tenant string, in
blocks = append(blocks, userBlock)
}

uriBlock := slack.NewSectionBlock(slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*URI:* %s", input.URI), false, false), nil, nil)
url := fmt.Sprintf("https://console.%s.cloud.nais.io", tenant) + input.URI
uriBlock := slack.NewSectionBlock(slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*URL:* %s", url), false, false), nil, nil)
tenantBlock := slack.NewSectionBlock(slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Tenant:* %s", tenant), false, false), nil, nil)
textBlock := slack.NewSectionBlock(slack.NewTextBlockObject("plain_text", input.Details, false, false), nil, nil)
blocks = append(blocks, uriBlock, tenantBlock, textBlock)
Expand Down

0 comments on commit e9ecaff

Please sign in to comment.