Documentation
¶
Index ¶
- func CreateChannel(ctx workflow.Context, prID int, prTitle, prURL string, maxLen int, ...) (string, error)
- func DestinationDetails(pr map[string]any) (workspace, repo, branch, commit string)
- func LoadPRTurns(ctx workflow.Context) map[string][]string
- func NormalizeChannelName(name string, maxLen int) string
- func NormalizeTime(timeStr, amPm string) (string, error)
- func PRDetails(ctx workflow.Context, url, userID string) string
- func RenameChannel(ctx workflow.Context, prID int, prTitle, prURL, channelID string, maxLen int, ...) error
- func RequiredReviewers(paths []string, owners map[string][]string) []string
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 LoadPRTurns ¶ added in v1.0.0
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 ¶
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
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 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.
Types ¶
This section is empty.