Skip to content

Commit

Permalink
Merge pull request #115 from ritsec/43-add-config-value-for-which-bra…
Browse files Browse the repository at this point in the history
…nch-to-pull-updates-for-update

changed to correct config to get GuildID
  • Loading branch information
c0untingNumbers committed May 10, 2024
2 parents 6e47a70 + 590fe78 commit 379d4ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/slash/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/bwmarrin/discordgo"
"github.com/ritsec/ops-bot-iii/commands/slash/permission"
"github.com/ritsec/ops-bot-iii/config"
"github.com/ritsec/ops-bot-iii/helpers"
"github.com/ritsec/ops-bot-iii/logging"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -52,7 +53,6 @@ func Update() (*discordgo.ApplicationCommand, func(s *discordgo.Session, i *disc
var err error

if branch == "main" {
logging.Debug(s, "Following the Main branch update flow", i.Member.User, span)
update, err = helpers.UpdateMainBranch()
if err != nil {
logging.Error(s, "Error updating main branch", i.Member.User, span, logrus.Fields{"err": err.Error()})
Expand All @@ -61,7 +61,7 @@ func Update() (*discordgo.ApplicationCommand, func(s *discordgo.Session, i *disc
} else {
// Soft lock the main server to main branch
// TODO change the id to main server id before merging
if i.GuildID == "1073013590702964856" {
if config.GuildID == "1073013590702964856" {
logging.Warning(s, "Branch config option used with /update", i.Member.User, span)
err = s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Expand Down

0 comments on commit 379d4ac

Please sign in to comment.