activities

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOKReaction

func AddOKReaction(ctx workflow.Context, url string)

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

func AlertError(ctx workflow.Context, channelName, prefix string, err error, details ...any) error

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

func AlertWarn(ctx workflow.Context, channelName, warning string, details ...any)

AlertWarn posts a Slack message with a warning message, if the Slack channel is configured.

func ArchiveChannel

func ArchiveChannel(ctx workflow.Context, channelID, prURL string) error

ArchiveChannel is an idempotent function, unlike the underlying Slack API call.

func CreateChannel

func CreateChannel(ctx workflow.Context, name, prURL string, private bool) (id string, retry bool, err error)

func DeleteFile

func DeleteFile(ctx workflow.Context, ids string)

func DeleteMessage

func DeleteMessage(ctx workflow.Context, channelID, timestamp string) error

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

func KickUsersFromChannel(ctx workflow.Context, channelID, prURL string, userIDs []string) error

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

func LookupChannel(ctx workflow.Context, prURL string) (string, bool)

LookupChannel returns the ID of a Slack channel associated with the given PR, if it exists.

func PostDMWithImage

func PostDMWithImage(ctx workflow.Context, senderID, recipientID, msg, imageURL, altText string) error

func PostEphemeralMessage

func PostEphemeralMessage(ctx workflow.Context, channelID, userID, msg string) error

func PostMessage

func PostMessage(ctx workflow.Context, channelID, msg string) error

func PostReply

func PostReply(ctx workflow.Context, channelID, timestamp, msg string) (*slack.ChatPostMessageResponse, error)

func PostReplyAsUser

func PostReplyAsUser(ctx workflow.Context, channelID, timestamp, name, icon, msg string) (*slack.ChatPostMessageResponse, error)

func RemoveOKReaction

func RemoveOKReaction(ctx workflow.Context, url string)

RemoveOKReaction removes the ":ok:" emoji from the Slack bot's reactions in the Slack message identified by the given PR comment URL.

func RenameChannel

func RenameChannel(ctx workflow.Context, channelID, name string) (bool, error)

func SetChannelDescription

func SetChannelDescription(ctx workflow.Context, channelID, title, prURL, email string)

func SetChannelTopic

func SetChannelTopic(ctx workflow.Context, channelID, prURL string)

func UpdateMessage

func UpdateMessage(ctx workflow.Context, channelID, timestamp, msg string) error

func Upload

func Upload(ctx workflow.Context, content []byte, filename, title, snippetType, mimeType, channelID, threadTS string) (*slack.File, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL