Skip to content

Commit

Permalink
Add experimental support for "all" channel (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
etcinit committed Dec 7, 2015
1 parent c1dca3c commit 61b02c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/controllers/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ func (f *FeedController) postReceive(c *gin.Context) {
if channelName != "" {
f.Slacker.SimplePost(channelName, storyText, icon, false)
}

// Support "all" channel.
channelMap := f.Config.GetStringMapString("channels.repositories")

if channelName, ok := channelMap["all"]; ok == true {
f.Slacker.SimplePost(channelName, storyText, icon, false)
}
break
case constants.PhidTypeTask:
channelName, err := f.Tasks.Resolve(res.PHID)
Expand All @@ -88,6 +95,13 @@ func (f *FeedController) postReceive(c *gin.Context) {
if channelName != "" {
f.Slacker.SimplePost(channelName, storyText, icon, false)
}

// Support "all" channel.
channelMap := f.Config.GetStringMapString("channels.repositories")

if channelName, ok := channelMap["all"]; ok == true {
f.Slacker.SimplePost(channelName, storyText, icon, false)
}
break
}

Expand Down

0 comments on commit 61b02c9

Please sign in to comment.