Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions base/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ type Options struct {
// Allow the bot to read it's own messages (default: false)
ReadSelf bool
AWSOpts *AWSOptions

// Optional, used for debugging to identify the bot.
DebugTag string
}

func NewOptions() *Options {
Expand All @@ -58,6 +61,7 @@ func (o *Options) Parse(fs *flag.FlagSet, argv []string) error {
fs.StringVar(&mysqlTLSCA, "mysql-tls-ca", os.Getenv("BOT_MYSQL_TLS_CA"), "Bot MySQL TLS CA")
fs.StringVar(&o.StathatEZKey, "stathat-ezkey", os.Getenv("BOT_STATHAT_EZKEY"), "Bot stathat ezkey")
fs.BoolVar(&o.ReadSelf, "read-self", false, "Allow the bot to read it's own messages")
fs.StringVar(&o.DebugTag, "debug-tag", os.Getenv("BOT_DEBUG_TAG"), "Bot debug tag")

awsOpts := &AWSOptions{}
fs.StringVar(&awsOpts.AWSRegion, "aws-region", os.Getenv("BOT_AWS_REGION"), "AWS region for cloudwatch logs, optional")
Expand Down Expand Up @@ -109,5 +113,6 @@ func (o *Options) Command(args ...string) *exec.Cmd {
return kbchat.RunOptions{
KeybaseLocation: o.KeybaseLocation,
HomeDir: o.Home,
DebugTag: o.DebugTag,
}.Command(args...)
}
1 change: 1 addition & 0 deletions canarybot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func NewBotServer(opts Options) *BotServer {
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
NumPipes: 5,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions elastiwatch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("elastiwatch", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions gcalbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("gcalbot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions githubbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("githubbot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions gitlabbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("gitlabbot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/gorilla/mux v1.7.3
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/keybase/go-codec v0.0.0-20180928230036-164397562123
github.com/keybase/go-keybase-chat-bot v0.0.0-20251212163122-450fd0812017
github.com/keybase/go-keybase-chat-bot v0.0.0-20260127182354-7367dd3315a3
github.com/opensearch-project/opensearch-go/v4 v4.5.0
github.com/stathat/go v1.0.0
github.com/stretchr/testify v1.11.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/keybase/go-codec v0.0.0-20180928230036-164397562123 h1:yg56lYPqh9suJepqxOMd/liFgU/x+maRPiB30JNYykM=
github.com/keybase/go-codec v0.0.0-20180928230036-164397562123/go.mod h1:r/eVVWCngg6TsFV/3HuS9sWhDkAzGG8mXhiuYA+Z/20=
github.com/keybase/go-keybase-chat-bot v0.0.0-20251212163122-450fd0812017 h1:lB6jgDag58Ie9yfLSGDQiUZt60zPyRpK6aWCtovQeSo=
github.com/keybase/go-keybase-chat-bot v0.0.0-20251212163122-450fd0812017/go.mod h1:wl5lBoVNkepL8Hzs7jyqg3GS6U+by4yQeNr7oT0Evt0=
github.com/keybase/go-keybase-chat-bot v0.0.0-20260127182354-7367dd3315a3 h1:0uwBoNFUfi+vqQplGh2md1bak0WYelaoqkjn6hBSwJM=
github.com/keybase/go-keybase-chat-bot v0.0.0-20260127182354-7367dd3315a3/go.mod h1:wl5lBoVNkepL8Hzs7jyqg3GS6U+by4yQeNr7oT0Evt0=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down
1 change: 1 addition & 0 deletions macrobot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func NewBotServer(opts base.Options) *BotServer {
Server: base.NewServer("macrobot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions meetbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("meetbot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions pollbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("pollbot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions triviabot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func NewBotServer(opts base.Options) *BotServer {
Server: base.NewServer("triviabot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions webhookbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewBotServer(opts Options) *BotServer {
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
NumPipes: 5,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
1 change: 1 addition & 0 deletions zoombot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func NewBotServer(opts Options) *BotServer {
Server: base.NewServer("zoombot", opts.Announcement, opts.AWSOpts, opts.MultiDSN, opts.ReadSelf, kbchat.RunOptions{
KeybaseLocation: opts.KeybaseLocation,
HomeDir: opts.Home,
DebugTag: opts.DebugTag,
}),
opts: opts,
}
Expand Down
Loading