Documentation
¶
Index ¶
- func AddOKReaction(ctx workflow.Context, url string)
- func AlertError(ctx workflow.Context, channelName, prefix string, err error, details ...any) error
- func AlertWarn(ctx workflow.Context, channelName, warning string, details ...any)
- func ArchiveChannel(ctx workflow.Context, channelID, prURL string) error
- func CreateChannel(ctx workflow.Context, name, prURL string, private bool) (id string, retry bool, err error)
- func DeleteFile(ctx workflow.Context, ids string)
- func DeleteMessage(ctx workflow.Context, channelID, timestamp string) error
- func InviteUsersToChannel(ctx workflow.Context, channelID, prURL string, ...) error
- func KickUsersFromChannel(ctx workflow.Context, channelID, prURL string, userIDs []string) error
- func LookupChannel(ctx workflow.Context, prURL string) (string, bool)
- func PostDMWithImage(ctx workflow.Context, senderID, recipientID, msg, imageURL, altText string) error
- func PostEphemeralMessage(ctx workflow.Context, channelID, userID, msg string) error
- func PostMessage(ctx workflow.Context, channelID, msg string) error
- func PostReply(ctx workflow.Context, channelID, timestamp, msg string) (*slack.ChatPostMessageResponse, error)
- func PostReplyAsUser(ctx workflow.Context, channelID, timestamp, name, icon, msg string) (*slack.ChatPostMessageResponse, error)
- func RemoveOKReaction(ctx workflow.Context, url string)
- func RenameChannel(ctx workflow.Context, channelID, name string) (bool, error)
- func SetChannelDescription(ctx workflow.Context, channelID, title, prURL, email string)
- func SetChannelTopic(ctx workflow.Context, channelID, prURL string)
- func UpdateMessage(ctx workflow.Context, channelID, timestamp, msg string) error
- func Upload(ctx workflow.Context, content []byte, ...) (*slack.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOKReaction ¶
AddOKReaction adds the ":ok:" emoji as a reaction to the Slack message identified by the given PR comment URL.
func AlertError ¶ added in v1.3.2
AlertError posts a Slack message about an error, if the Slack channel is configured. This function returns the original error for convenience, so it can be used inline.
func AlertWarn ¶ added in v1.3.2
AlertWarn posts a Slack message with a warning message, if the Slack channel is configured.
func ArchiveChannel ¶
ArchiveChannel is an idempotent function, unlike the underlying Slack API call.
func CreateChannel ¶
func DeleteFile ¶
func InviteUsersToChannel ¶
func InviteUsersToChannel(ctx workflow.Context, channelID, prURL string, participantIDs, followerIDs []string) error
InviteUsersToChannel adds up to 1,000 users to the given Slack channel and PR attention state (the given users are expected to be opted-in). This is an idempotent function, unlike the underlying Slack API call.
func KickUsersFromChannel ¶
KickUsersFromChannel removes the given users from the given Slack channel and PR attention state. This is an idempotent function, unlike the underlying Slack API call.
func LookupChannel ¶ added in v1.1.0
LookupChannel returns the ID of a Slack channel associated with the given PR, if it exists.
func PostDMWithImage ¶
func PostEphemeralMessage ¶
func PostReplyAsUser ¶
func RemoveOKReaction ¶
RemoveOKReaction removes the ":ok:" emoji from the Slack bot's reactions in the Slack message identified by the given PR comment URL.
func SetChannelDescription ¶
func SetChannelTopic ¶
func UpdateMessage ¶
Types ¶
This section is empty.