diff options
author | 6543 <24977596+6543@users.noreply.github.com> | 2019-10-15 00:40:17 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-14 23:40:17 +0100 |
commit | 733c898a907b23fa9e0c1bf108be5c5d9f9f7eb0 (patch) | |
tree | 4f4d42b141cd64efb9ebe7a213438088fdbef0e9 /routers | |
parent | 0be992a1e26f61a182113266a2eb34f77b87f9b4 (diff) | |
download | gitea-733c898a907b23fa9e0c1bf108be5c5d9f9f7eb0.tar.gz gitea-733c898a907b23fa9e0c1bf108be5c5d9f9f7eb0.zip |
[Branch View] Add Included TAG (#8449)
* included message
* add property IsIncluded
* Add Orange Lable
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/branch.go | 4 |
1 files changed, 4 insertions, 0 deletions
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, |