From 733c898a907b23fa9e0c1bf108be5c5d9f9f7eb0 Mon Sep 17 00:00:00 2001 From: 6543 <24977596+6543@users.noreply.github.com> Date: Tue, 15 Oct 2019 00:40:17 +0200 Subject: [Branch View] Add Included TAG (#8449) * included message * add property IsIncluded * Add Orange Lable --- routers/repo/branch.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'routers') diff --git a/routers/repo/branch.go b/routers/repo/branch.go index 5d78518491..0c06de3ea6 100644 --- a/routers/repo/branch.go +++ b/routers/repo/branch.go @@ -28,6 +28,7 @@ type Branch struct { Commit *git.Commit IsProtected bool IsDeleted bool + IsIncluded bool DeletedBranch *models.DeletedBranch CommitsAhead int CommitsBehind int @@ -203,10 +204,13 @@ func loadBranches(ctx *context.Context) []*Branch { } } + isIncluded := divergence.Ahead == 0 && ctx.Repo.Repository.DefaultBranch != branchName + branches[i] = &Branch{ Name: branchName, Commit: commit, IsProtected: isProtected, + IsIncluded: isIncluded, CommitsAhead: divergence.Ahead, CommitsBehind: divergence.Behind, LatestPullRequest: pr, -- cgit v1.2.3