summaryrefslogtreecommitdiffstats
path: root/services/pull
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 /services/pull
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 'services/pull')
-rw-r--r--services/pull/pull.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go
index 23a4bf9776..499bafff1e 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -640,8 +640,8 @@ func GetCommitMessages(pr *models.PullRequest) string {
return stringBuilder.String()
}
-// GetLastCommitStatus returns the last commit status for this pull request.
-func GetLastCommitStatus(pr *models.PullRequest) (status *models.CommitStatus, err error) {
+// GetLastCommitStatus returns list of commit statuses for latest commit on this pull request.
+func GetLastCommitStatus(pr *models.PullRequest) (status []*models.CommitStatus, err error) {
if err = pr.LoadBaseRepo(); err != nil {
return nil, err
}
@@ -666,7 +666,7 @@ func GetLastCommitStatus(pr *models.PullRequest) (status *models.CommitStatus, e
if err != nil {
return nil, err
}
- return models.CalcCommitStatus(statusList), nil
+ return statusList, nil
}
// IsHeadEqualWithBranch returns if the commits of branchName are available in pull request head