Help us shape the future of Go! Take the 2026 Go Developer Survey

slack

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Slack

type Slack struct {
	Client *socketmode.Client
}

func (*Slack) DM added in v0.0.2

func (s *Slack) DM(userID string, message string) error

DM sends a direct message to a user

func (*Slack) GetConversationMembers added in v0.0.2

func (s *Slack) GetConversationMembers(channelID string) ([]string, error)

GetConversationMembers returns a list of slack users in a channel

func (*Slack) GetUserGithubLogin added in v0.0.2

func (s *Slack) GetUserGithubLogin(slackUserID string) (string, error)

GetUserGithubLogin returns a github login for a Slack user based on custom fields

func (*Slack) Init

func (s *Slack) Init(debug bool) error

Init initializes Slack client

func (*Slack) LogGithubSlackUserMappings added in v0.0.2

func (s *Slack) LogGithubSlackUserMappings()

LogGithubSlackUserMappings logs mappings of slack to GH for debug

func (*Slack) LogUserInfo added in v0.0.2

func (s *Slack) LogUserInfo(slackUserID string)

LogUserInfo logs info about a Slack user by their user ID

func (*Slack) LogsUsersInChannel added in v0.0.2

func (s *Slack) LogsUsersInChannel(channelID string)

LogsUsersInChannel logs users in the channel

func (*Slack) MakeGithubToSlackUserMap added in v0.0.2

func (s *Slack) MakeGithubToSlackUserMap() (map[string]string, error)

MakeGithubToSlackUserMap builds a map of ALL slack users with their github logins based on the info found in Slack custom profile fields

func (*Slack) MakeGithubToSlackUserMapInChannels added in v0.0.2

func (s *Slack) MakeGithubToSlackUserMapInChannels(channelIDs []string) (map[string]string, error)

MakeGithubtoSlackUserMapInChannels builds a map of slack users found in the channel with their github logins based on the info found in Slack custom profile fields

func (*Slack) SendMessage

func (s *Slack) SendMessage(prn cfg.PrNotification, message string) error

SendMessage sends a slack message based on PR notification config

func (*Slack) SlackSocketModeHandler added in v0.0.2

func (s *Slack) SlackSocketModeHandler(conf *cfg.AppConfig)

SlackSocketModeHandler handles Slack events in Socket Mode

func (*Slack) SlackToGithubUpdateLoop added in v0.0.2

func (s *Slack) SlackToGithubUpdateLoop(conf *cfg.AppConfig)

SlackToGithubUpdateLoop runs a loop forever and updates the Slack to GitHub user mapping

Jump to

Keyboard shortcuts

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