slack

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChannel added in v0.4.0

func CreateChannel(ctx workflow.Context, prID int, prTitle, prURL string, maxLen int, prefix string, private bool) (string, error)

CreateChannel creates a Slack channel for a new pull/merge request, and returns the channel ID. It is a lightweight wrapper for activities.CreateChannel which utilizes NormalizeChannelName. The first 3 parameters describe the PR, and the last 3 parameters are RevChat configuration settings.

func DestinationDetails added in v1.0.0

func DestinationDetails(pr map[string]any) (workspace, repo, branch, commit string)

func LoadPRTurns added in v1.0.0

func LoadPRTurns(ctx workflow.Context) map[string][]string

LoadPRTurns scans all stored PR turn files, and returns a map of Slack user IDs to all the PR URLs they need to be reminded about.

func NormalizeChannelName

func NormalizeChannelName(name string, maxLen int) string

NormalizeChannelName transforms arbitrary text into a valid Slack channel name. Based on: https://docs.slack.dev/reference/methods/conversations.create#naming.

func NormalizeTime added in v1.0.0

func NormalizeTime(timeStr, amPm string) (string, error)

NormalizeTime takes a time string and an optional am/pm indicator, and returns the time in a standardized format or an error if invalid.

func PRDetails added in v1.0.0

func PRDetails(ctx workflow.Context, url, userID string) string

func RenameChannel added in v0.5.0

func RenameChannel(ctx workflow.Context, prID int, prTitle, prURL, channelID string, maxLen int, prefix string) error

RenameChannel renames an existing Slack channel when the title of its corresponding pull/merge request changes. It is a lightweight wrapper for activities.RenameChannel which utilizes NormalizeChannelName. The first 3 parameters describe the PR, and the last 2 parameters are RevChat configuration settings.

func RequiredReviewers added in v1.0.0

func RequiredReviewers(paths []string, owners map[string][]string) []string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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