aboutsummaryrefslogtreecommitdiffstats
path: root/models/commit_status.go
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-12-20 04:13:12 +0100
committerGitHub <noreply@github.com>2020-12-20 11:13:12 +0800
commitf3c4baa84b8fa7afb3eab137b4c5e3544bd9e761 (patch)
treeb45be56f4fc8a5d1da04649ab2baa7a6a19eefe9 /models/commit_status.go
parent029836c34c75a277e1e1309f590905a71e5d312a (diff)
downloadgitea-f3c4baa84b8fa7afb3eab137b4c5e3544bd9e761.tar.gz
gitea-f3c4baa84b8fa7afb3eab137b4c5e3544bd9e761.zip
Show dropdown with all statuses for commit (#13977)
* Show dropdown with all statuses for commit * Use popups * Remove unnecessary change * Style popup * Use divided list * As per @silverwind * Refactor GetLastCommitStatus * Missing dropdown on repo home and commit page * Fix tests * Make status icon be a part of a link on PR list * Fix missing translation call * Indent fix Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'models/commit_status.go')
-rw-r--r--models/commit_status.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/commit_status.go b/models/commit_status.go
index 9dffece378..5d637afc2b 100644
--- a/models/commit_status.go
+++ b/models/commit_status.go
@@ -252,7 +252,8 @@ func NewCommitStatus(opts NewCommitStatusOptions) error {
// SignCommitWithStatuses represents a commit with validation of signature and status state.
type SignCommitWithStatuses struct {
- Status *CommitStatus
+ Status *CommitStatus
+ Statuses []*CommitStatus
*SignCommit
}
@@ -272,6 +273,7 @@ func ParseCommitsWithStatus(oldCommits *list.List, repo *Repository) *list.List
if err != nil {
log.Error("GetLatestCommitStatus: %v", err)
} else {
+ commit.Statuses = statuses
commit.Status = CalcCommitStatus(statuses)
}