Skip to content

Commit 0a2b93d

Browse files
authored
Fix typo "GetLatestRunnerToken" (#27680)
1 parent 0b654fa commit 0a2b93d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

models/actions/runner_token.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func NewRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerTo
8282
})
8383
}
8484

85-
// GetLastestRunnerToken returns the latest runner token
86-
func GetLastestRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerToken, error) {
85+
// GetLatestRunnerToken returns the latest runner token
86+
func GetLatestRunnerToken(ctx context.Context, ownerID, repoID int64) (*ActionRunnerToken, error) {
8787
var runnerToken ActionRunnerToken
8888
has, err := db.GetEngine(ctx).Where("owner_id=? AND repo_id=?", ownerID, repoID).
8989
OrderBy("id DESC").Get(&runnerToken)

routers/private/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func GenerateActionsRunnerToken(ctx *context.PrivateContext) {
4141
})
4242
}
4343

44-
token, err := actions_model.GetLastestRunnerToken(ctx, owner, repo)
44+
token, err := actions_model.GetLatestRunnerToken(ctx, owner, repo)
4545
if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) {
4646
token, err = actions_model.NewRunnerToken(ctx, owner, repo)
4747
if err != nil {

routers/web/shared/actions/runners.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ func RunnersList(ctx *context.Context, opts actions_model.FindRunnerOptions) {
3535

3636
// ownid=0,repo_id=0,means this token is used for global
3737
var token *actions_model.ActionRunnerToken
38-
token, err = actions_model.GetLastestRunnerToken(ctx, opts.OwnerID, opts.RepoID)
38+
token, err = actions_model.GetLatestRunnerToken(ctx, opts.OwnerID, opts.RepoID)
3939
if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) {
4040
token, err = actions_model.NewRunnerToken(ctx, opts.OwnerID, opts.RepoID)
4141
if err != nil {
4242
ctx.ServerError("CreateRunnerToken", err)
4343
return
4444
}
4545
} else if err != nil {
46-
ctx.ServerError("GetLastestRunnerToken", err)
46+
ctx.ServerError("GetLatestRunnerToken", err)
4747
return
4848
}
4949

0 commit comments

Comments
 (0)