aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/pull.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-12-18 03:33:32 +0000
committerGitHub <noreply@github.com>2020-12-18 11:33:32 +0800
commite483220ea3c54137cec543842261f99c4696129a (patch)
tree2f81f173315b8ebe92403290977c09bfc32bf754 /routers/repo/pull.go
parent27edc1aa19afb043a497a7dc628afa420cb1de55 (diff)
downloadgitea-e483220ea3c54137cec543842261f99c4696129a.tar.gz
gitea-e483220ea3c54137cec543842261f99c4696129a.zip
[Refactor] CombinedStatus and CommitStatus related functions & structs (#14026)
* RM unused struct * rename (*CommitStatus) loadRepo() -> loadAttributes() * move ToCommitStatus into its own file * use CommitStatusState instead of StatusState * move CombinedStatus convertion into convert package * let models.GetLatestCommitStatus use repoID direct and accept ListOptions * update swagger docs * fix tests * Fix swagger docs * rm page * fix swagger docs!!! * return json null * always return json * rename api.Status to api.CommitStatus * fix swagger docs * sec swagger fix
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r--routers/repo/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 0ea6ec33de..bee3bbc1df 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -368,7 +368,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
ctx.ServerError(fmt.Sprintf("GetRefCommitID(%s)", pull.GetGitRefName()), err)
return nil
}
- commitStatuses, err := models.GetLatestCommitStatus(repo, sha, 0)
+ commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{})
if err != nil {
ctx.ServerError("GetLatestCommitStatus", err)
return nil
@@ -449,7 +449,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
return nil
}
- commitStatuses, err := models.GetLatestCommitStatus(repo, sha, 0)
+ commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{})
if err != nil {
ctx.ServerError("GetLatestCommitStatus", err)
return nil