Skip to content

Commit 76c5505

Browse files
committed
fix lint
1 parent 7a75b1c commit 76c5505

File tree

10 files changed

+54
-50
lines changed

10 files changed

+54
-50
lines changed

routers/api/v1/admin/runners.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ func CreateRegistrationToken(ctx *context.APIContext) {
4242

4343
// ListRunners get global runners
4444
func ListRunners(ctx *context.APIContext) {
45-
// swagger:operation GET /admin/actions/runners admin getRunners
45+
// swagger:operation GET /admin/actions/runners admin getAdminRunners
4646
// ---
4747
// summary: Get global runners
4848
// produces:
4949
// - application/json
5050
// responses:
5151
// "200":
52-
// "$ref": "#/definitions/RunnerList"
52+
// "$ref": "#/definitions/ActionRunnersResponse"
5353
// "400":
5454
// "$ref": "#/responses/error"
5555
// "404":
@@ -59,7 +59,7 @@ func ListRunners(ctx *context.APIContext) {
5959

6060
// GetRunner get an global runner
6161
func GetRunner(ctx *context.APIContext) {
62-
// swagger:operation GET /admin/actions/runners/{runner_id} admin getRunner
62+
// swagger:operation GET /admin/actions/runners/{runner_id} admin getAdminRunner
6363
// ---
6464
// summary: Get an global runner
6565
// produces:
@@ -72,7 +72,7 @@ func GetRunner(ctx *context.APIContext) {
7272
// required: true
7373
// responses:
7474
// "200":
75-
// "$ref": "#/definitions/Runner"
75+
// "$ref": "#/definitions/ActionRunner"
7676
// "400":
7777
// "$ref": "#/responses/error"
7878
// "404":
@@ -82,7 +82,7 @@ func GetRunner(ctx *context.APIContext) {
8282

8383
// DeleteRunner delete an global runner
8484
func DeleteRunner(ctx *context.APIContext) {
85-
// swagger:operation DELETE /admin/actions/runners/{runner_id} admin deleteRunner
85+
// swagger:operation DELETE /admin/actions/runners/{runner_id} admin deleteAdminRunner
8686
// ---
8787
// summary: Delete an global runner
8888
// produces:

routers/api/v1/org/action.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ func (Action) UpdateVariable(ctx *context.APIContext) {
489489

490490
// ListRunners get org-level runners
491491
func (Action) ListRunners(ctx *context.APIContext) {
492-
// swagger:operation GET /orgs/{org}/actions/runners organization getRunners
492+
// swagger:operation GET /orgs/{org}/actions/runners organization getOrgRunners
493493
// ---
494494
// summary: Get org-level runners
495495
// produces:
@@ -502,7 +502,7 @@ func (Action) ListRunners(ctx *context.APIContext) {
502502
// required: true
503503
// responses:
504504
// "200":
505-
// "$ref": "#/definitions/RunnerList"
505+
// "$ref": "#/definitions/ActionRunnersResponse"
506506
// "400":
507507
// "$ref": "#/responses/error"
508508
// "404":
@@ -512,7 +512,7 @@ func (Action) ListRunners(ctx *context.APIContext) {
512512

513513
// GetRunner get an org-level runner
514514
func (Action) GetRunner(ctx *context.APIContext) {
515-
// swagger:operation GET /orgs/{org}/actions/runners/{runner_id} organization getRunner
515+
// swagger:operation GET /orgs/{org}/actions/runners/{runner_id} organization getOrgRunner
516516
// ---
517517
// summary: Get an org-level runner
518518
// produces:
@@ -530,7 +530,7 @@ func (Action) GetRunner(ctx *context.APIContext) {
530530
// required: true
531531
// responses:
532532
// "200":
533-
// "$ref": "#/definitions/Runner"
533+
// "$ref": "#/definitions/ActionRunner"
534534
// "400":
535535
// "$ref": "#/responses/error"
536536
// "404":
@@ -540,7 +540,7 @@ func (Action) GetRunner(ctx *context.APIContext) {
540540

541541
// DeleteRunner delete an org-level runner
542542
func (Action) DeleteRunner(ctx *context.APIContext) {
543-
// swagger:operation DELETE /orgs/{org}/actions/runners/{runner_id} organization deleteRunner
543+
// swagger:operation DELETE /orgs/{org}/actions/runners/{runner_id} organization deleteOrgRunner
544544
// ---
545545
// summary: Delete an org-level runner
546546
// produces:

routers/api/v1/repo/action.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (Action) DeleteSecret(ctx *context.APIContext) {
182182
// required: true
183183
// responses:
184184
// "204":
185-
// description: delete one secret of the organization
185+
// description: delete one secret of the repository
186186
// "400":
187187
// "$ref": "#/responses/error"
188188
// "404":
@@ -553,7 +553,7 @@ func (Action) CreateRegistrationToken(ctx *context.APIContext) {
553553

554554
// ListRunners get repo-level runners
555555
func (Action) ListRunners(ctx *context.APIContext) {
556-
// swagger:operation GET /repos/{owner}/{repo}/actions/runners organization getRunners
556+
// swagger:operation GET /repos/{owner}/{repo}/actions/runners repository getRepoRunners
557557
// ---
558558
// summary: Get repo-level runners
559559
// produces:
@@ -571,7 +571,7 @@ func (Action) ListRunners(ctx *context.APIContext) {
571571
// required: true
572572
// responses:
573573
// "200":
574-
// "$ref": "#/definitions/RunnerList"
574+
// "$ref": "#/definitions/ActionRunnersResponse"
575575
// "400":
576576
// "$ref": "#/responses/error"
577577
// "404":
@@ -581,7 +581,7 @@ func (Action) ListRunners(ctx *context.APIContext) {
581581

582582
// GetRunner get an repo-level runner
583583
func (Action) GetRunner(ctx *context.APIContext) {
584-
// swagger:operation GET /repos/{owner}/{repo}/actions/runners/{runner_id} organization getRunner
584+
// swagger:operation GET /repos/{owner}/{repo}/actions/runners/{runner_id} repository getRepoRunner
585585
// ---
586586
// summary: Get an repo-level runner
587587
// produces:
@@ -604,7 +604,7 @@ func (Action) GetRunner(ctx *context.APIContext) {
604604
// required: true
605605
// responses:
606606
// "200":
607-
// "$ref": "#/definitions/Runner"
607+
// "$ref": "#/definitions/ActionRunner"
608608
// "400":
609609
// "$ref": "#/responses/error"
610610
// "404":
@@ -614,7 +614,7 @@ func (Action) GetRunner(ctx *context.APIContext) {
614614

615615
// DeleteRunner delete an repo-level runner
616616
func (Action) DeleteRunner(ctx *context.APIContext) {
617-
// swagger:operation DELETE /repos/{owner}/{repo}/actions/runners/{runner_id} organization deleteRunner
617+
// swagger:operation DELETE /repos/{owner}/{repo}/actions/runners/{runner_id} repository deleteRepoRunner
618618
// ---
619619
// summary: Delete an repo-level runner
620620
// produces:

routers/api/v1/shared/runners.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"code.gitea.io/gitea/routers/api/v1/utils"
1515
"code.gitea.io/gitea/services/context"
1616
"code.gitea.io/gitea/services/convert"
17+
1718
"xorm.io/builder"
1819
)
1920

routers/api/v1/user/runners.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ func CreateRegistrationToken(ctx *context.APIContext) {
4242

4343
// ListRunners get user-level runners
4444
func ListRunners(ctx *context.APIContext) {
45-
// swagger:operation GET /user/actions/runners user getRunners
45+
// swagger:operation GET /user/actions/runners user getUserRunners
4646
// ---
4747
// summary: Get user-level runners
4848
// produces:
4949
// - application/json
5050
// responses:
5151
// "200":
52-
// "$ref": "#/definitions/RunnerList"
52+
// "$ref": "#/definitions/ActionRunnersResponse"
5353
// "400":
5454
// "$ref": "#/responses/error"
5555
// "404":
@@ -59,7 +59,7 @@ func ListRunners(ctx *context.APIContext) {
5959

6060
// GetRunner get an user-level runner
6161
func GetRunner(ctx *context.APIContext) {
62-
// swagger:operation GET /user/actions/runners/{runner_id} user getRunner
62+
// swagger:operation GET /user/actions/runners/{runner_id} user getUserRunner
6363
// ---
6464
// summary: Get an user-level runner
6565
// produces:
@@ -72,7 +72,7 @@ func GetRunner(ctx *context.APIContext) {
7272
// required: true
7373
// responses:
7474
// "200":
75-
// "$ref": "#/definitions/Runner"
75+
// "$ref": "#/definitions/ActionRunner"
7676
// "400":
7777
// "$ref": "#/responses/error"
7878
// "404":
@@ -82,7 +82,7 @@ func GetRunner(ctx *context.APIContext) {
8282

8383
// DeleteRunner delete an user-level runner
8484
func DeleteRunner(ctx *context.APIContext) {
85-
// swagger:operation DELETE /user/actions/runners/{runner_id} user deleteRunner
85+
// swagger:operation DELETE /user/actions/runners/{runner_id} user deleteUserRunner
8686
// ---
8787
// summary: Delete an user-level runner
8888
// produces:

routers/web/shared/actions/runners.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
shared_user "code.gitea.io/gitea/routers/web/shared/user"
1919
"code.gitea.io/gitea/services/context"
2020
"code.gitea.io/gitea/services/forms"
21+
2122
"xorm.io/builder"
2223
)
2324

services/convert/convert.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"strings"
1212
"time"
1313

14-
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
1514
actions_model "code.gitea.io/gitea/models/actions"
1615
asymkey_model "code.gitea.io/gitea/models/asymkey"
1716
"code.gitea.io/gitea/models/auth"
@@ -31,6 +30,8 @@ import (
3130
"code.gitea.io/gitea/modules/util"
3231
asymkey_service "code.gitea.io/gitea/services/asymkey"
3332
"code.gitea.io/gitea/services/gitdiff"
33+
34+
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
3435
)
3536

3637
// ToEmail convert models.EmailAddress to api.Email

0 commit comments

Comments
 (0)