users

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitbucketIDToEmail added in v1.1.0

func BitbucketIDToEmail(ctx workflow.Context, accountID string) string

BitbucketIDToEmail is a trivial wrapper around data.BitbucketIDToEmail.

func BitbucketIDToSlackID added in v1.1.0

func BitbucketIDToSlackID(ctx workflow.Context, accountID string, checkOptIn bool) string

BitbucketIDToSlackID converts a Bitbucket account ID into a Slack user ID. This function returns an empty string if the account ID is not found. It uses persistent data storage, or API calls as a fallback.

func BitbucketIDToSlackRef added in v1.1.0

func BitbucketIDToSlackRef(ctx workflow.Context, accountID, displayName string) string

BitbucketIDToSlackRef converts a Bitbucket account ID into a Slack user mention. This function returns a display name if the account ID is not found. It uses persistent data storage, or API calls as a fallback.

func EmailToBitbucketID added in v0.4.0

func EmailToBitbucketID(ctx workflow.Context, email string) string

EmailToBitbucketID retrieves a Bitbucket user's account ID based on their email address. This function returns an empty string if the account ID is not found. It uses persistent data storage, or API calls as a fallback.

func EmailToSlackID

func EmailToSlackID(ctx workflow.Context, email string) string

EmailToSlackID retrieves a Slack user's ID based on their email address. This function returns an empty string if the user ID is not found. It uses persistent data storage, or API calls as a fallback.

func GitHubIDToEmail added in v1.1.0

func GitHubIDToEmail(ctx workflow.Context, username string) string

GitHubIDToEmail converts a GitHub username into an email address. This function returns an empty string if the username is not found. It uses persistent data storage, or API calls as a fallback.

func GitHubIDToSlackID added in v1.1.0

func GitHubIDToSlackID(ctx workflow.Context, username string, checkOptIn bool) string

GitHubIDToSlackID converts a GitHub username into a Slack user ID. This function returns an empty string if the username is not found, or if it belongs to a GitHub team. It uses persistent data storage, or API calls as a fallback.

func GitHubIDToSlackRef added in v1.1.0

func GitHubIDToSlackRef(ctx workflow.Context, username, url, userType string) string

GitHubIDToSlackRef converts a GitHub user into a Slack user reference. This function returns a GitHub profile link (in Slack markdown format) if the user is not found in Slack, or if it's a GitHub bot/team. It uses persistent data storage, or API calls as a fallback.

func SlackIDToDisplayName added in v0.9.0

func SlackIDToDisplayName(ctx workflow.Context, userID string) string

SlackIDToDisplayName retrieves a Slack user's display name based on their ID. This function uses ephemeral data caching, or API calls as a fallback. Note that display names are not permanent like SlackIDToRealName.

func SlackIDToEmail added in v0.4.0

func SlackIDToEmail(ctx workflow.Context, userID string) string

SlackIDToEmail converts a Slack user's ID into their email address. This function returns an empty string if the user ID is not found. It uses persistent data storage, or API calls as a fallback.

func SlackIDToIcon added in v1.0.0

func SlackIDToIcon(ctx workflow.Context, userID string) string

SlackIDToIcon retrieves a Slack user's icon path based on their ID. This function uses ephemeral data caching, or API calls as a fallback.

func SlackIDToRealName added in v0.9.0

func SlackIDToRealName(ctx workflow.Context, userID string) string

SlackIDToRealName retrieves a Slack user's full name based on their ID. This function uses persistent data storage, or API calls as a fallback. Note that real names are permanent unlike SlackIDToDisplayName.

func SlackMentionToBitbucketRef added in v1.1.0

func SlackMentionToBitbucketRef(ctx workflow.Context, slackUserRef string) string

SlackMentionToBitbucketRef converts a Slack user mention ("<@U123>") into a Bitbucket account ID ("@{account:uuid}"). This function returns the user's full/display name if the user is not found. It uses persistent data storage, or API calls as a fallback.

Types

This section is empty.

Jump to

Keyboard shortcuts

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