You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runners.go 950B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package repo
  4. import (
  5. "code.gitea.io/gitea/routers/api/v1/shared"
  6. "code.gitea.io/gitea/services/context"
  7. )
  8. // GetRegistrationToken returns the token to register repo runners
  9. func GetRegistrationToken(ctx *context.APIContext) {
  10. // swagger:operation GET /repos/{owner}/{repo}/runners/registration-token repository repoGetRunnerRegistrationToken
  11. // ---
  12. // summary: Get a repository's actions runner registration token
  13. // produces:
  14. // - application/json
  15. // parameters:
  16. // - name: owner
  17. // in: path
  18. // description: owner of the repo
  19. // type: string
  20. // required: true
  21. // - name: repo
  22. // in: path
  23. // description: name of the repo
  24. // type: string
  25. // required: true
  26. // responses:
  27. // "200":
  28. // "$ref": "#/responses/RegistrationToken"
  29. shared.GetRegistrationToken(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID)
  30. }