Browse Source

[GINR] refs with hideme hould not be dashboarded

cgars 7 years ago
parent
commit
ba1a131349
1 changed files with 10 additions and 3 deletions
  1. 10 3
      routes/user/home.go

+ 10 - 3
routes/user/home.go

@@ -16,6 +16,7 @@ import (
 	"github.com/G-Node/gogs/pkg/context"
 	"github.com/G-Node/gogs/pkg/setting"
 	log "gopkg.in/clog.v1"
+	"strings"
 )
 
 const (
@@ -81,9 +82,15 @@ func retrieveFeeds(c *context.Context, ctxUser *models.User, userID int64, isPro
 		act.ActAvatar = unameAvatars[act.ActUserName]
 
 		// 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:
 			feeds = append(feeds, act)
 		}