Documentation
¶
Index ¶
- func BitbucketToSlackID(ctx workflow.Context, cmd *cli.Command, accountID string, checkOptIn bool) string
- func BitbucketToSlackRef(ctx workflow.Context, cmd *cli.Command, accountID, displayName string) string
- func EmailToBitbucketID(ctx workflow.Context, workspace, email string) (string, error)
- func EmailToSlackID(ctx workflow.Context, email string) string
- func GitHubToSlackID(ctx workflow.Context, cmd *cli.Command, username string, checkOptIn bool) string
- func GitHubToSlackRef(ctx workflow.Context, cmd *cli.Command, username, url string) string
- func SlackIDToEmail(ctx workflow.Context, userID string) (string, error)
- func SlackToBitbucketRef(ctx workflow.Context, bitbucketWorkspace, slackUserRef string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitbucketToSlackID ¶
func BitbucketToSlackID(ctx workflow.Context, cmd *cli.Command, 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, cmd *cli.Command, 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
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 ¶
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 ¶
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
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
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.