fix: add missing ctx

This commit is contained in:
Jason Song
2022-12-05 14:46:34 +08:00
parent bd1af5b7f8
commit fdd3444c52
5 changed files with 26 additions and 26 deletions

View File

@ -60,7 +60,7 @@ func (run *BotRun) LoadAttributes(ctx context.Context) error {
}
if run.Repo == nil {
repo, err := repo_model.GetRepositoryByIDCtx(ctx, run.RepoID)
repo, err := repo_model.GetRepositoryByID(ctx, run.RepoID)
if err != nil {
return err
}
@ -151,7 +151,7 @@ func InsertRun(run *BotRun, jobs []*jobparser.SingleWorkflow) error {
}
if run.Repo == nil {
repo, err := repo_model.GetRepositoryByIDCtx(ctx, run.RepoID)
repo, err := repo_model.GetRepositoryByID(ctx, run.RepoID)
if err != nil {
return err
}
@ -254,7 +254,7 @@ func UpdateRun(ctx context.Context, run *BotRun, cols ...string) error {
}
}
if run.Repo == nil {
repo, err := repo_model.GetRepositoryByIDCtx(ctx, run.RepoID)
repo, err := repo_model.GetRepositoryByID(ctx, run.RepoID)
if err != nil {
return err
}