Skip to content

Commit e1f0991

Browse files
committed
git-annex: hide PR banner for special branches
This hides the banner you can see on a repositories page that proposes to open a PR for your branch if you recently pushed to said branch, but only if that branch is named git-annex or starts with synced/.
1 parent 821cace commit e1f0991

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

models/git/branch.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ func FindRecentlyPushedNewBranches(ctx context.Context, repoID, userID int64, ex
394394
err := db.GetEngine(ctx).
395395
Where("pusher_id=? AND is_deleted=?", userID, false).
396396
And("name <> ?", excludeBranchName).
397+
And("name <> ?", "git-annex").
398+
And("NOT name LIKE ?", "synced/%").
397399
And("repo_id = ?", repoID).
398400
And("commit_time >= ?", time.Now().Add(-time.Hour*6).Unix()).
399401
NotIn("name", subQuery).

0 commit comments

Comments
 (0)