MCPcopy Create free account
hub / github.com/actions/actions-runner-controller / createRegistrationToken

Method createRegistrationToken

github/github.go:324–332  ·  view source on GitHub ↗

wrappers for github functions (switch between enterprise/organization/repository mode) so the calling functions don't need to switch and their code is a bit cleaner

(ctx context.Context, enterprise, org, repo string)

Source from the content-addressed store, hash-verified

322// so the calling functions don't need to switch and their code is a bit cleaner
323
324func (c *Client) createRegistrationToken(ctx context.Context, enterprise, org, repo string) (*github.RegistrationToken, *github.Response, error) {
325 if len(repo) > 0 {
326 return c.Actions.CreateRegistrationToken(ctx, org, repo)
327 }
328 if len(org) > 0 {
329 return c.Actions.CreateOrganizationRegistrationToken(ctx, org)
330 }
331 return c.Enterprise.CreateRegistrationToken(ctx, enterprise)
332}
333
334func (c *Client) removeRunner(ctx context.Context, enterprise, org, repo string, runnerID int64) (*github.Response, error) {
335 if len(repo) > 0 {

Callers 1

GetRegistrationTokenMethod · 0.95

Implementers 1

Clientcontrollers/actions.github.com/multicl

Calls

no outgoing calls

Tested by

no test coverage detected