Skip to content

Commit

Permalink
remove yaml references
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanSussman committed Oct 8, 2018
1 parent e3b625b commit 009bd6e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ go build . && ./flottbot
DEBU[0000] Registering bot...
DEBU[0000] Bot 'flottbot' registered!
DEBU[0000] Searching for rules directory...
DEBU[0000] Fetching all YAML files...
DEBU[0000] Reading and parsing YAML files...
DEBU[0000] Fetching all rule files...
DEBU[0000] Reading and parsing rule files...
DEBU[0000] Successfully created rules
DEBU[0000] Registering flottbot to Slack...
DEBU[0000] Found channels!
Expand Down
2 changes: 1 addition & 1 deletion core/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func handleNoMatch(outputMsgs chan<- models.Message, message models.Message, hit
Prommetric(bot.Name+"-None", bot)
// Set custom_help_text if it is set in bot.yml
helpMsg := bot.CustomHelpText
// If custom_help_text is not set, use default Help Text, for each rule use help_text from rule yaml file
// If custom_help_text is not set, use default Help Text, for each rule use help_text from rule file
if len(helpMsg) == 0 {
helpMsg = "I understand these commands: \n"
// Go through all the rules and collect the help_text
Expand Down
2 changes: 1 addition & 1 deletion handlers/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// ScriptExec handles 'exec' actions; script executions for rules
func ScriptExec(args models.Action, msg *models.Message, bot *models.Bot) (*models.ScriptResponse, error) {
bot.Log.Debugf("Executing process for action '%s'", args.Name)
// Default timeout of 20 seconds for any script execution, modifyable in rule yaml file
// Default timeout of 20 seconds for any script execution, modifyable in rule file
if args.Timeout == 0 {
args.Timeout = 20
}
Expand Down
2 changes: 1 addition & 1 deletion models/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/sirupsen/logrus"

// Bot is a struct representation of bot.yml
type Bot struct {
// Bot YAML fields
// Bot fields
ID string `mapstructure:"id"`
Name string `mapstructure:"name" binding:"required"`
SlackToken string `mapstructure:"slack_token"`
Expand Down
6 changes: 3 additions & 3 deletions models/remotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import "github.com/nlopes/slack"

// Remotes is a struct that holds data for various remotes
type Remotes struct {
Slack SlackConfig `yaml:"slack" binding:"omitempty"`
Discord DiscordConfig `yaml:"discord" binding:"omitempty"`
Slack SlackConfig `mapstructure:"slack" binding:"omitempty"`
Discord DiscordConfig `mapstructure:"discord" binding:"omitempty"`
}

// SlackConfig is a support struct that holds Slack specific data
type SlackConfig struct {
Attachments []slack.Attachment `yaml:"attachments"`
Attachments []slack.Attachment `mapstructure:"attachments"`
}

// DiscordConfig is a support struct that holds DiscordConfig specific data
Expand Down
2 changes: 1 addition & 1 deletion models/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ type Rule struct {
Actions []Action `mapstructure:"actions" binding:"required"`
Remotes Remotes `mapstructure:"remotes" binding:"omitempty"`
Reaction string `mapstructure:"reaction" binding:"omitempty"`
// The following fields are not included in rule yaml
// The following fields are not included in rule file
RemoveReaction string
}

0 comments on commit 009bd6e

Please sign in to comment.