|
@@ -16,6 +16,7 @@ import (
|
|
"github.com/G-Node/gogs/pkg/context"
|
|
"github.com/G-Node/gogs/pkg/context"
|
|
"github.com/G-Node/gogs/pkg/setting"
|
|
"github.com/G-Node/gogs/pkg/setting"
|
|
log "gopkg.in/clog.v1"
|
|
log "gopkg.in/clog.v1"
|
|
|
|
+ "strings"
|
|
)
|
|
)
|
|
|
|
|
|
const (
|
|
const (
|
|
@@ -81,9 +82,15 @@ func retrieveFeeds(c *context.Context, ctxUser *models.User, userID int64, isPro
|
|
act.ActAvatar = unameAvatars[act.ActUserName]
|
|
act.ActAvatar = unameAvatars[act.ActUserName]
|
|
|
|
|
|
// This filters branches from the feed
|
|
// This filters branches from the feed
|
|
- switch branch := act.RefName; branch {
|
|
|
|
- case "synced/git-annex", "synced/master", "git-annex", "hideme":
|
|
|
|
- log.Trace("Ignored Ref %s for feed", branch)
|
|
|
|
|
|
+ switch {
|
|
|
|
+ case strings.Contains(act.RefName, "synced/git-annex"):
|
|
|
|
+ log.Trace("Ignored Ref %s for feed", act.RefName)
|
|
|
|
+ case strings.Contains(act.RefName, "synced/master"):
|
|
|
|
+ log.Trace("Ignored Ref %s for feed", act.RefName)
|
|
|
|
+ case strings.Contains(act.RefName, "git-annex"):
|
|
|
|
+ log.Trace("Ignored Ref %s for feed", act.RefName)
|
|
|
|
+ case strings.Contains(act.RepoName, "hideme"):
|
|
|
|
+ log.Trace("Ignored Ref %s for feed", act.RefName)
|
|
default:
|
|
default:
|
|
feeds = append(feeds, act)
|
|
feeds = append(feeds, act)
|
|
}
|
|
}
|