github kubeshop/botkube v1.2.0

latest releases: v1.14.0-rc.1, v1.13.0, v1.13.0-rc.1...
16 months ago

What's Changed

Breaking Changes 💥

Note
All those changes only affect SDK users who have their custom plugins written in Go.

  • The pluginx.ExecuteCommand function signature was changed.

    Old:

    func ExecuteCommand(ctx context.Context, rawCmd string) (string, error)

    New:

    func ExecuteCommand(ctx context.Context, rawCmd string, mutators ...ExecuteCommandMutation) (ExecuteCommandOutput, error)

    Reason
    The ExecuteCommand function signature has been changed to unify the command execution functions. The new signature allows for the passing of mutation functions to customize the execution and ensures future extensibility without breaking changes. Additionally, the introduction of the ExecuteCommandOutput type provides direct access to the stdout and stderr of the executed command. This is particularly useful when commands produce output on stderr, even if they have not failed.

  • The pluginx.ExecuteCommandWithEnvs function has been deprecated. To achieve the same functionality, use pluginx.ExecuteCommand(ctx, "cmd", pluginx.ExecuteCommandEnvs(envs)).

Implemented Enhancements 🎉

Fixed Bugs 🐛

Other Changes ✨

Full Changelog: v1.1.0...v1.2.0

Don't miss a new botkube release

NewReleases is sending notifications on new releases.