summaryrefslogtreecommitdiffstats
path: root/models/git/commit_status.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-03 10:48:26 +0800
committerGitHub <noreply@github.com>2022-12-03 10:48:26 +0800
commit0a7d3ff786508284224ada17956a65bb759d9265 (patch)
tree4860fca95c1432ab59c6723ee2b053b1c7d6779d /models/git/commit_status.go
parent8698458f48eafeab21014db544aa7160368856e1 (diff)
downloadgitea-0a7d3ff786508284224ada17956a65bb759d9265.tar.gz
gitea-0a7d3ff786508284224ada17956a65bb759d9265.zip
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'models/git/commit_status.go')
-rw-r--r--models/git/commit_status.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/git/commit_status.go b/models/git/commit_status.go
index 928f1771fe..0fb0bc66af 100644
--- a/models/git/commit_status.go
+++ b/models/git/commit_status.go
@@ -114,13 +114,13 @@ func GetNextCommitStatusIndex(ctx context.Context, repoID int64, sha string) (in
func (status *CommitStatus) loadAttributes(ctx context.Context) (err error) {
if status.Repo == nil {
- status.Repo, err = repo_model.GetRepositoryByIDCtx(ctx, status.RepoID)
+ status.Repo, err = repo_model.GetRepositoryByID(ctx, status.RepoID)
if err != nil {
return fmt.Errorf("getRepositoryByID [%d]: %w", status.RepoID, err)
}
}
if status.Creator == nil && status.CreatorID > 0 {
- status.Creator, err = user_model.GetUserByIDCtx(ctx, status.CreatorID)
+ status.Creator, err = user_model.GetUserByID(ctx, status.CreatorID)
if err != nil {
return fmt.Errorf("getUserByID [%d]: %w", status.CreatorID, err)
}