users

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitbucketToEmail added in v0.6.0

func BitbucketToEmail(ctx workflow.Context, accountID string) (string, error)

BitbucketToEmail converts a Bitbucket account ID into an email address. This depends on the user's email address being the same in both systems. This function uses data caching, and API calls as a fallback.

func BitbucketToSlackID

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

BitbucketToSlackID converts a Bitbucket account ID into a Slack user ID. This depends on the user's email address being the same in both systems. This function returns an empty string if the account ID is not found.

func BitbucketToSlackRef

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

BitbucketToSlackRef converts a Bitbucket account ID into a Slack user reference. This depends on the user's email address being the same in both systems. This function returns the Bitbucket display name if the user is not found in Slack.

func EmailToBitbucketID added in v0.4.0

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

EmailToBitbucketID retrieves a Bitbucket user's account ID based on their email address. This function uses data caching, and 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 uses data caching, and API calls as a fallback.

func GitHubToSlackID

func GitHubToSlackID(ctx workflow.Context, cmd *cli.Command, username string, checkOptIn bool) string

GitHubToSlackID converts a GitHub username into a Slack user ID. This depends on the user's email address being the same in both systems. This function returns an empty string if the username is not found, or if it belongs to a GitHub team or app.

func GitHubToSlackRef

func GitHubToSlackRef(ctx workflow.Context, cmd *cli.Command, username, url string) string

GitHubToSlackRef converts GitHub user details into a Slack user reference. This depends on the user's email address being the same in both systems. This function returns a GitHub profile link (in Slack markdown format) if the user is not found in Slack, or if it belongs to a GitHub team or app.

func SlackIDToEmail added in v0.4.0

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

SlackIDToEmail retrieves a Slack user's email address based on their ID. This function uses data caching, and API calls as a fallback. Not finding an email address is considered an error.

func SlackToBitbucketRef added in v0.5.0

func SlackToBitbucketRef(ctx workflow.Context, bitbucketWorkspace, slackUserRef string) string

SlackToBitbucketRef converts a Slack user reference ("<@U123>") into a Bitbucket account ID ("@{account:uuid}"). This depends on the user's email address being the same in both systems. This function returns the Slack display name if the user is not found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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