|
|
|
@ -35,7 +35,7 @@ func RunnersList(ctx *context.Context, opts actions_model.FindRunnerOptions) { |
|
|
|
|
|
|
|
|
|
// ownid=0,repo_id=0,means this token is used for global
|
|
|
|
|
var token *actions_model.ActionRunnerToken |
|
|
|
|
token, err = actions_model.GetLastestRunnerToken(ctx, opts.OwnerID, opts.RepoID) |
|
|
|
|
token, err = actions_model.GetLatestRunnerToken(ctx, opts.OwnerID, opts.RepoID) |
|
|
|
|
if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) { |
|
|
|
|
token, err = actions_model.NewRunnerToken(ctx, opts.OwnerID, opts.RepoID) |
|
|
|
|
if err != nil { |
|
|
|
@ -43,7 +43,7 @@ func RunnersList(ctx *context.Context, opts actions_model.FindRunnerOptions) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} else if err != nil { |
|
|
|
|
ctx.ServerError("GetLastestRunnerToken", err) |
|
|
|
|
ctx.ServerError("GetLatestRunnerToken", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|