|
|
@ -28,6 +28,7 @@ type Branch struct {
|
|
|
|
Commit *git.Commit
|
|
|
|
Commit *git.Commit
|
|
|
|
IsProtected bool
|
|
|
|
IsProtected bool
|
|
|
|
IsDeleted bool
|
|
|
|
IsDeleted bool
|
|
|
|
|
|
|
|
IsIncluded bool
|
|
|
|
DeletedBranch *models.DeletedBranch
|
|
|
|
DeletedBranch *models.DeletedBranch
|
|
|
|
CommitsAhead int
|
|
|
|
CommitsAhead int
|
|
|
|
CommitsBehind 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{
|
|
|
|
branches[i] = &Branch{
|
|
|
|
Name: branchName,
|
|
|
|
Name: branchName,
|
|
|
|
Commit: commit,
|
|
|
|
Commit: commit,
|
|
|
|
IsProtected: isProtected,
|
|
|
|
IsProtected: isProtected,
|
|
|
|
|
|
|
|
IsIncluded: isIncluded,
|
|
|
|
CommitsAhead: divergence.Ahead,
|
|
|
|
CommitsAhead: divergence.Ahead,
|
|
|
|
CommitsBehind: divergence.Behind,
|
|
|
|
CommitsBehind: divergence.Behind,
|
|
|
|
LatestPullRequest: pr,
|
|
|
|
LatestPullRequest: pr,
|
|
|
|