Skip to content

Commit 592c8c3

Browse files
committed
update getactors
1 parent 04791cd commit 592c8c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

models/actions/run_list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ func GetStatusInfoList(ctx context.Context) []StatusInfo {
134134
func GetActors(ctx context.Context, repoID int64) ([]*user_model.User, error) {
135135
actors := make([]*user_model.User, 0, 10)
136136

137-
return actors, db.GetEngine(ctx).Where(builder.In("id", builder.Select("`user`.id").From("`user`").
138-
Join("INNER", "`action_run`", "`action_run`.trigger_user_id = `user`.id").
139-
And(builder.Eq{"`action_run`.repo_id": repoID}))).
137+
return actors, db.GetEngine(ctx).Where(builder.In("id", builder.Select("`action_run`.trigger_user_id").From("`action_run`").
138+
GroupBy("`action_run`.trigger_user_id").
139+
Where(builder.Eq{"`action_run`.repo_id": repoID}))).
140140
Cols("id", "name", "full_name", "avatar", "avatar_email", "use_custom_avatar").
141141
OrderBy(user_model.GetOrderByName()).
142142
Find(&actors)

0 commit comments

Comments
 (0)