From eec5ed07521ffc767c0dd1bdccdece8a7f54fe3f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 20 Sep 2023 13:43:48 +0800 Subject: [PATCH 01/10] Add get actions runner registration token for API routes, repo, org and global level --- routers/api/v1/admin/runners.go | 26 +++++++++++++++ routers/api/v1/api.go | 19 ++++++++--- routers/api/v1/org/runners.go | 31 ++++++++++++++++++ routers/api/v1/org/{action.go => secrets.go} | 0 routers/api/v1/repo/runners.go | 34 ++++++++++++++++++++ routers/api/v1/shared/runners.go | 28 ++++++++++++++++ 6 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 routers/api/v1/admin/runners.go create mode 100644 routers/api/v1/org/runners.go rename routers/api/v1/org/{action.go => secrets.go} (100%) create mode 100644 routers/api/v1/repo/runners.go create mode 100644 routers/api/v1/shared/runners.go diff --git a/routers/api/v1/admin/runners.go b/routers/api/v1/admin/runners.go new file mode 100644 index 0000000000000..d4c2f16235873 --- /dev/null +++ b/routers/api/v1/admin/runners.go @@ -0,0 +1,26 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package admin + +import ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/routers/api/v1/shared" +) + +// https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization + +// GetRegistrationToken list an organization's actions secrets +func GetRegistrationToken(ctx *context.APIContext) { + // swagger:operation GET /admin/runners/registration-token admin adminGetRunnerRegistrationToken + // --- + // summary: Get an global actions runner registration token + // produces: + // - application/json + // parameters: + // responses: + // "200": + // "$ref": "#/responses/RegistrationToken" + + shared.GetRegistrationToken(ctx, 0, 0) +} diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 763d56ecd2622..7b31847ec688b 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -1430,11 +1430,17 @@ func Routes() *web.Route { m.Combo("/{username}").Get(reqToken(), org.IsMember). Delete(reqToken(), reqOrgOwnership(), org.DeleteMember) }) - m.Group("/actions/secrets", func() { - m.Get("", reqToken(), reqOrgOwnership(), org.ListActionsSecrets) - m.Combo("/{secretname}"). - Put(reqToken(), reqOrgOwnership(), bind(api.CreateOrUpdateSecretOption{}), org.CreateOrUpdateSecret). - Delete(reqToken(), reqOrgOwnership(), org.DeleteSecret) + m.Group("/actions", func() { + m.Group("/secrets", func() { + m.Get("", reqToken(), reqOrgOwnership(), org.ListActionsSecrets) + m.Combo("/{secretname}"). + Put(reqToken(), reqOrgOwnership(), bind(api.CreateOrUpdateSecretOption{}), org.CreateOrUpdateSecret). + Delete(reqToken(), reqOrgOwnership(), org.DeleteSecret) + }) + + m.Group("/runners", func() { + m.Get("/registration-token", reqToken(), reqOrgOwnership(), org.GetRegistrationToken) + }) }) m.Group("/public_members", func() { m.Get("", org.ListPublicMembers) @@ -1526,6 +1532,9 @@ func Routes() *web.Route { Patch(bind(api.EditHookOption{}), admin.EditHook). Delete(admin.DeleteHook) }) + m.Group("/runners", func() { + m.Get("/registration-token", admin.GetRegistrationToken) + }) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryAdmin), reqToken(), reqSiteAdmin()) m.Group("/topics", func() { diff --git a/routers/api/v1/org/runners.go b/routers/api/v1/org/runners.go new file mode 100644 index 0000000000000..c9880fa83a555 --- /dev/null +++ b/routers/api/v1/org/runners.go @@ -0,0 +1,31 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package org + +import ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/routers/api/v1/shared" +) + +// https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization + +// GetRegistrationToken list an organization's actions secrets +func GetRegistrationToken(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/actions/runners/registration-token organization orgGetRunnerRegistrationToken + // --- + // summary: Get an organization's actions runner registration token + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/RegistrationToken" + + shared.GetRegistrationToken(ctx, ctx.Org.Organization.ID, 0) +} diff --git a/routers/api/v1/org/action.go b/routers/api/v1/org/secrets.go similarity index 100% rename from routers/api/v1/org/action.go rename to routers/api/v1/org/secrets.go diff --git a/routers/api/v1/repo/runners.go b/routers/api/v1/repo/runners.go new file mode 100644 index 0000000000000..0c4a06ea8db60 --- /dev/null +++ b/routers/api/v1/repo/runners.go @@ -0,0 +1,34 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package repo + +import ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/routers/api/v1/shared" +) + +// GetRegistrationToken list an organization's actions secrets +func GetRegistrationToken(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/runners/registration-token repo repoGetRunnerRegistrationToken + // --- + // summary: Get a repository's actions runner registration token + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/RegistrationToken" + + shared.GetRegistrationToken(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID) +} diff --git a/routers/api/v1/shared/runners.go b/routers/api/v1/shared/runners.go new file mode 100644 index 0000000000000..3df55049f1786 --- /dev/null +++ b/routers/api/v1/shared/runners.go @@ -0,0 +1,28 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package shared + +import ( + "errors" + "net/http" + + actions_model "code.gitea.io/gitea/models/actions" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/util" +) + +func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { + token, err := actions_model.GetUnactivatedRunnerToken(ctx, ownerID, repoID) + if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) { + token, err = actions_model.NewRunnerToken(ctx, ownerID, repoID) + } + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.JSON(http.StatusOK, map[string]string{ + "token": token.Token, + }) +} From 3754b659f18825d884eac9536b64565728f59ec9 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 20 Sep 2023 14:25:42 +0800 Subject: [PATCH 02/10] update swagger --- templates/swagger/v1_json.tmpl | 78 +++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 39c5a7fe117df..8fde974788481 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -392,6 +392,23 @@ } } }, + "/admin/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Get an global actions runner registration token", + "operationId": "adminGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, "/admin/unadopted": { "get": { "produces": [ @@ -1562,6 +1579,32 @@ } } }, + "/orgs/{org}/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get an organization's actions runner registration token", + "operationId": "orgGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, "/orgs/{org}/actions/secrets": { "get": { "produces": [ @@ -12272,6 +12315,39 @@ } } }, + "/repos/{owner}/{repo}/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repo" + ], + "summary": "Get a repository's actions runner registration token", + "operationId": "repoGetRunnerRegistrationToken", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, "/repos/{owner}/{repo}/signing-key.gpg": { "get": { "produces": [ @@ -23983,4 +24059,4 @@ "TOTPHeader": [] } ] -} +} \ No newline at end of file From 177ca7c046235cd3d6a0df30abc4b65c4662bbdb Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 20 Sep 2023 22:14:31 +0800 Subject: [PATCH 03/10] Fix lint --- templates/swagger/v1_json.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 8fde974788481..5a18044369dc0 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -24059,4 +24059,4 @@ "TOTPHeader": [] } ] -} \ No newline at end of file +} From e805e662d8cdea925cc3236bbfa3becd0e6a458e Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 21 Sep 2023 09:23:05 +0800 Subject: [PATCH 04/10] Fix lint --- routers/api/v1/shared/runners.go | 10 +++++++--- templates/swagger/v1_json.tmpl | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/shared/runners.go b/routers/api/v1/shared/runners.go index 3df55049f1786..347be4e3f83ee 100644 --- a/routers/api/v1/shared/runners.go +++ b/routers/api/v1/shared/runners.go @@ -12,6 +12,12 @@ import ( "code.gitea.io/gitea/modules/util" ) +// RegistrationToken is response related to registeration token +// swagger:response RegistrationToken +type RegistrationToken struct { + Token string `json:"token"` +} + func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { token, err := actions_model.GetUnactivatedRunnerToken(ctx, ownerID, repoID) if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) { @@ -22,7 +28,5 @@ func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { return } - ctx.JSON(http.StatusOK, map[string]string{ - "token": token.Token, - }) + ctx.JSON(http.StatusOK, RegistrationToken{Token: token.Token}) } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 5a18044369dc0..456b08d462823 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -23691,6 +23691,14 @@ } } }, + "RegistrationToken": { + "description": "RegistrationToken is response related to registeration token", + "headers": { + "token": { + "type": "string" + } + } + }, "Release": { "description": "Release", "schema": { From b796adf89b3fe31903e408d171145b50c7c5f36b Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 27 Sep 2023 13:10:32 +0800 Subject: [PATCH 05/10] Fix comments --- routers/api/v1/admin/runners.go | 2 +- routers/api/v1/org/runners.go | 2 +- routers/api/v1/repo/runners.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/admin/runners.go b/routers/api/v1/admin/runners.go index d4c2f16235873..c0d9364435071 100644 --- a/routers/api/v1/admin/runners.go +++ b/routers/api/v1/admin/runners.go @@ -10,7 +10,7 @@ import ( // https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization -// GetRegistrationToken list an organization's actions secrets +// GetRegistrationToken returns the token to register global runners func GetRegistrationToken(ctx *context.APIContext) { // swagger:operation GET /admin/runners/registration-token admin adminGetRunnerRegistrationToken // --- diff --git a/routers/api/v1/org/runners.go b/routers/api/v1/org/runners.go index c9880fa83a555..05bce8daefbc9 100644 --- a/routers/api/v1/org/runners.go +++ b/routers/api/v1/org/runners.go @@ -10,7 +10,7 @@ import ( // https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization -// GetRegistrationToken list an organization's actions secrets +// GetRegistrationToken returns the token to register org runners func GetRegistrationToken(ctx *context.APIContext) { // swagger:operation GET /orgs/{org}/actions/runners/registration-token organization orgGetRunnerRegistrationToken // --- diff --git a/routers/api/v1/repo/runners.go b/routers/api/v1/repo/runners.go index 0c4a06ea8db60..86bbfaa763e61 100644 --- a/routers/api/v1/repo/runners.go +++ b/routers/api/v1/repo/runners.go @@ -8,7 +8,7 @@ import ( "code.gitea.io/gitea/routers/api/v1/shared" ) -// GetRegistrationToken list an organization's actions secrets +// GetRegistrationToken returns the token to register repo runners func GetRegistrationToken(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/runners/registration-token repo repoGetRunnerRegistrationToken // --- From df47c02505a99739395bad41582896268e84b4eb Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 28 Sep 2023 16:18:08 +0800 Subject: [PATCH 06/10] Fix bug --- routers/api/v1/shared/runners.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/shared/runners.go b/routers/api/v1/shared/runners.go index 347be4e3f83ee..4dcd1a8bf83b4 100644 --- a/routers/api/v1/shared/runners.go +++ b/routers/api/v1/shared/runners.go @@ -19,7 +19,7 @@ type RegistrationToken struct { } func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { - token, err := actions_model.GetUnactivatedRunnerToken(ctx, ownerID, repoID) + token, err := actions_model.GetLastestRunnerToken(ctx, ownerID, repoID) if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) { token, err = actions_model.NewRunnerToken(ctx, ownerID, repoID) } From d1c14f91cbce51a9d05de064d4506876a88f4625 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 20 Oct 2023 09:39:19 +0800 Subject: [PATCH 07/10] Apply suggestions from code review Co-authored-by: Denys Konovalov --- routers/api/v1/repo/runners.go | 2 +- routers/api/v1/shared/runners.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/runners.go b/routers/api/v1/repo/runners.go index 86bbfaa763e61..0a2bbf81176c9 100644 --- a/routers/api/v1/repo/runners.go +++ b/routers/api/v1/repo/runners.go @@ -10,7 +10,7 @@ import ( // GetRegistrationToken returns the token to register repo runners func GetRegistrationToken(ctx *context.APIContext) { - // swagger:operation GET /repos/{owner}/{repo}/runners/registration-token repo repoGetRunnerRegistrationToken + // swagger:operation GET /repos/{owner}/{repo}/runners/registration-token repository repoGetRunnerRegistrationToken // --- // summary: Get a repository's actions runner registration token // produces: diff --git a/routers/api/v1/shared/runners.go b/routers/api/v1/shared/runners.go index 4dcd1a8bf83b4..a342bd4b63712 100644 --- a/routers/api/v1/shared/runners.go +++ b/routers/api/v1/shared/runners.go @@ -19,7 +19,7 @@ type RegistrationToken struct { } func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { - token, err := actions_model.GetLastestRunnerToken(ctx, ownerID, repoID) + token, err := actions_model.GetLatestRunnerToken(ctx, ownerID, repoID) if errors.Is(err, util.ErrNotExist) || (token != nil && !token.IsActive) { token, err = actions_model.NewRunnerToken(ctx, ownerID, repoID) } From 3becab2b7f58d5761ab517055ff4d37812d1c916 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 30 Oct 2023 23:15:19 +0800 Subject: [PATCH 08/10] Fix swagger --- routers/api/v1/repo/runners.go | 2 +- templates/swagger/v1_json.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/runners.go b/routers/api/v1/repo/runners.go index 86bbfaa763e61..ee9c389189da1 100644 --- a/routers/api/v1/repo/runners.go +++ b/routers/api/v1/repo/runners.go @@ -21,7 +21,7 @@ func GetRegistrationToken(ctx *context.APIContext) { // description: owner of the repo // type: string // required: true - // - name: repo + // - name: repository // in: path // description: name of the repo // type: string diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 320f3cdd46fb7..25485b9b11207 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -12429,7 +12429,7 @@ { "type": "string", "description": "name of the repo", - "name": "repo", + "name": "repository", "in": "path", "required": true } From bba250f3e99bef12bbd9a1d9d790ab8155c999d5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 30 Oct 2023 23:27:51 +0800 Subject: [PATCH 09/10] Add missed user runners --- routers/api/v1/api.go | 28 ++++++++++++++++++++-------- routers/api/v1/repo/runners.go | 2 +- routers/api/v1/user/runners.go | 26 ++++++++++++++++++++++++++ templates/swagger/v1_json.tmpl | 21 +++++++++++++++++++-- 4 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 routers/api/v1/user/runners.go diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index fe875969965a5..25009b867a4e9 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -958,10 +958,16 @@ func Routes() *web.Route { Delete(bind(api.DeleteEmailOption{}), user.DeleteEmail) // create or update a user's actions secrets - m.Group("/actions/secrets", func() { - m.Combo("/{secretname}"). - Put(bind(api.CreateOrUpdateSecretOption{}), user.CreateOrUpdateSecret). - Delete(user.DeleteSecret) + m.Group("/actions", func() { + m.Group("/secrets", func() { + m.Combo("/{secretname}"). + Put(bind(api.CreateOrUpdateSecretOption{}), user.CreateOrUpdateSecret). + Delete(user.DeleteSecret) + }) + + m.Group("/runners", func() { + m.Get("/registration-token", reqToken(), user.GetRegistrationToken) + }) }) m.Get("/followers", user.ListMyFollowers) @@ -1061,10 +1067,16 @@ func Routes() *web.Route { m.Post("/accept", repo.AcceptTransfer) m.Post("/reject", repo.RejectTransfer) }, reqToken()) - m.Group("/actions/secrets", func() { - m.Combo("/{secretname}"). - Put(reqToken(), reqOwner(), bind(api.CreateOrUpdateSecretOption{}), repo.CreateOrUpdateSecret). - Delete(reqToken(), reqOwner(), repo.DeleteSecret) + m.Group("/actions", func() { + m.Group("/secrets", func() { + m.Combo("/{secretname}"). + Put(reqToken(), reqOwner(), bind(api.CreateOrUpdateSecretOption{}), repo.CreateOrUpdateSecret). + Delete(reqToken(), reqOwner(), repo.DeleteSecret) + }) + + m.Group("/runners", func() { + m.Get("/registration-token", reqToken(), reqOwner(), repo.GetRegistrationToken) + }) }) m.Group("/hooks/git", func() { m.Combo("").Get(repo.ListGitHooks) diff --git a/routers/api/v1/repo/runners.go b/routers/api/v1/repo/runners.go index 2b1d09fcdb04d..0a2bbf81176c9 100644 --- a/routers/api/v1/repo/runners.go +++ b/routers/api/v1/repo/runners.go @@ -21,7 +21,7 @@ func GetRegistrationToken(ctx *context.APIContext) { // description: owner of the repo // type: string // required: true - // - name: repository + // - name: repo // in: path // description: name of the repo // type: string diff --git a/routers/api/v1/user/runners.go b/routers/api/v1/user/runners.go new file mode 100644 index 0000000000000..51556ae0fb8c0 --- /dev/null +++ b/routers/api/v1/user/runners.go @@ -0,0 +1,26 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package user + +import ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/routers/api/v1/shared" +) + +// https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization + +// GetRegistrationToken returns the token to register user runners +func GetRegistrationToken(ctx *context.APIContext) { + // swagger:operation GET /user/actions/runners/registration-token user userGetRunnerRegistrationToken + // --- + // summary: Get an user's actions runner registration token + // produces: + // - application/json + // parameters: + // responses: + // "200": + // "$ref": "#/responses/RegistrationToken" + + shared.GetRegistrationToken(ctx, ctx.Doer.ID, 0) +} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 25485b9b11207..e99fffa817670 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -12414,7 +12414,7 @@ "application/json" ], "tags": [ - "repo" + "repository" ], "summary": "Get a repository's actions runner registration token", "operationId": "repoGetRunnerRegistrationToken", @@ -12429,7 +12429,7 @@ { "type": "string", "description": "name of the repo", - "name": "repository", + "name": "repo", "in": "path", "required": true } @@ -14599,6 +14599,23 @@ } } }, + "/user/actions/runners/registration-token": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Get an user's actions runner registration token", + "operationId": "userGetRunnerRegistrationToken", + "responses": { + "200": { + "$ref": "#/responses/RegistrationToken" + } + } + } + }, "/user/actions/secrets/{secretname}": { "put": { "consumes": [ From 1eb1b24d2c75d9ea415dd469a8d0521a8ea53d57 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 30 Oct 2023 19:26:49 -0400 Subject: [PATCH 10/10] Update api.go Co-authored-by: Denys Konovalov --- routers/api/v1/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 25009b867a4e9..53870ef1e1b27 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -957,7 +957,7 @@ func Routes() *web.Route { Post(bind(api.CreateEmailOption{}), user.AddEmail). Delete(bind(api.DeleteEmailOption{}), user.DeleteEmail) - // create or update a user's actions secrets + // manage user-level actions features m.Group("/actions", func() { m.Group("/secrets", func() { m.Combo("/{secretname}").