aboutsummaryrefslogtreecommitdiffstats
path: root/services/convert/repository.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/convert/repository.go')
-rw-r--r--services/convert/repository.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/convert/repository.go b/services/convert/repository.go
index 3ba604002e..5db68e8379 100644
--- a/services/convert/repository.go
+++ b/services/convert/repository.go
@@ -126,7 +126,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc
if err := t.LoadAttributes(ctx); err != nil {
log.Warn("LoadAttributes of RepoTransfer: %v", err)
} else {
- transfer = ToRepoTransfer(t)
+ transfer = ToRepoTransfer(ctx, t)
}
}
}
@@ -140,7 +140,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc
return &api.Repository{
ID: repo.ID,
- Owner: ToUserWithAccessMode(repo.Owner, mode),
+ Owner: ToUserWithAccessMode(ctx, repo.Owner, mode),
Name: repo.Name,
FullName: repo.FullName(),
Description: repo.Description,
@@ -185,7 +185,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc
DefaultDeleteBranchAfterMerge: defaultDeleteBranchAfterMerge,
DefaultMergeStyle: string(defaultMergeStyle),
DefaultAllowMaintainerEdit: defaultAllowMaintainerEdit,
- AvatarURL: repo.AvatarLink(),
+ AvatarURL: repo.AvatarLink(ctx),
Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate,
MirrorInterval: mirrorInterval,
MirrorUpdated: mirrorUpdated,
@@ -194,12 +194,12 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc
}
// ToRepoTransfer convert a models.RepoTransfer to a structs.RepeTransfer
-func ToRepoTransfer(t *models.RepoTransfer) *api.RepoTransfer {
- teams, _ := ToTeams(t.Teams, false)
+func ToRepoTransfer(ctx context.Context, t *models.RepoTransfer) *api.RepoTransfer {
+ teams, _ := ToTeams(ctx, t.Teams, false)
return &api.RepoTransfer{
- Doer: ToUser(t.Doer, nil),
- Recipient: ToUser(t.Recipient, nil),
+ Doer: ToUser(ctx, t.Doer, nil),
+ Recipient: ToUser(ctx, t.Recipient, nil),
Teams: teams,
}
}