code.gitea.io/gitea@v1.22.3/routers/api/v1/admin/runners.go (about)

     1  // Copyright 2023 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package admin
     5  
     6  import (
     7  	"code.gitea.io/gitea/routers/api/v1/shared"
     8  	"code.gitea.io/gitea/services/context"
     9  )
    10  
    11  // https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-an-organization
    12  
    13  // GetRegistrationToken returns the token to register global runners
    14  func GetRegistrationToken(ctx *context.APIContext) {
    15  	// swagger:operation GET /admin/runners/registration-token admin adminGetRunnerRegistrationToken
    16  	// ---
    17  	// summary: Get an global actions runner registration token
    18  	// produces:
    19  	// - application/json
    20  	// parameters:
    21  	// responses:
    22  	//   "200":
    23  	//     "$ref": "#/responses/RegistrationToken"
    24  
    25  	shared.GetRegistrationToken(ctx, 0, 0)
    26  }