mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-02 16:35:19 +02:00
[Branch View] Add Included TAG (#8449)
* included message * add property IsIncluded * Add Orange Lable
This commit is contained in:
parent
0be992a1e2
commit
733c898a90
3 changed files with 11 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue