Skip to content

Commit

Permalink
chore(deps): bump github.com/slack-go/slack from 0.14.0 to 0.15.0 (#203)
Browse files Browse the repository at this point in the history
* chore(deps): bump github.com/slack-go/slack from 0.14.0 to 0.15.0

Bumps [github.com/slack-go/slack](https://github.com/slack-go/slack) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/slack-go/slack/releases)
- [Changelog](https://github.com/slack-go/slack/blob/master/CHANGELOG.md)
- [Commits](slack-go/slack@v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: github.com/slack-go/slack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(slack): switch to "V2" upload API

As can be seen [when updating `slack-go`][run], the current API is
deprecated and we need to update to continue working beyond May 2025.

[run]: https://github.com/grafana/flagger-k6-webhook/actions/runs/11342664073/job/31543572688?pr=203

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Iain Lane <iain@grafana.com>
  • Loading branch information
dependabot[bot] and iainlane authored Oct 16, 2024
1 parent eab3d6a commit 9e7a6d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/google/uuid v1.6.0
github.com/prometheus/client_golang v1.20.4
github.com/sirupsen/logrus v1.9.3
github.com/slack-go/slack v0.14.0
github.com/slack-go/slack v0.15.0
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.5
k8s.io/api v0.31.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/slack-go/slack v0.14.0 h1:6c0UTfbRnvRssZUsZ2qe0Iu07VAMPjRqOa6oX8ewF4k=
github.com/slack-go/slack v0.14.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/slack-go/slack v0.15.0 h1:LE2lj2y9vqqiOf+qIIy0GvEoxgF1N5yLGZffmEZykt0=
github.com/slack-go/slack v0.15.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
6 changes: 3 additions & 3 deletions pkg/slack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ func (w *slackClientWrapper) UpdateMessages(slackMessages map[string]string, tex

func (w *slackClientWrapper) AddFileToThreads(slackMessages map[string]string, fileName, content string) error {
for channelID, ts := range slackMessages {
fileParams := slack.FileUploadParameters{
fileParams := slack.UploadFileV2Parameters{
Title: fileName,
Content: content,
Channels: []string{channelID},
Channel: channelID,
ThreadTimestamp: ts,
}
if _, err := w.client.UploadFile(fileParams); err != nil {
if _, err := w.client.UploadFileV2(fileParams); err != nil {
return fmt.Errorf("error while uploading output to %s in slack channel %s: %w", ts, channelID, err)
}
}
Expand Down

0 comments on commit 9e7a6d9

Please sign in to comment.