{"modulePath":"github.com/redhat-developer/mapt","version":"v0.14.7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Variables\n\n```go\nvar (\n\tWindows Platform = \"win\"\n\tLinux   Platform = \"linux\"\n\tDarwin  Platform = \"osx\"\n\n\tArm64   Arch = \"arm64\"\n\tAmd64   Arch = \"x64\"\n\tArm     Arch = \"arm\"\n\tPpc64le Arch = \"ppc64le\"\n\tS390x   Arch = \"s390x\"\n)\n```\n\n## Functions\n\n```go\nfunc DeleteOrgRunner(pat, org, name string) error\n```\nDeleteOrgRunner removes the named runner from the given GitHub organization.\n\n```go\nfunc DeleteRepoRunner(pat, repoURL, name string) error\n```\nDeleteRepoRunner removes the named runner from the given repository. repoURL is \"owner/repo\" or \"[https://github.com/owner/repo](https://github.com/owner/repo)\".\n\n```go\nfunc ExportRunnerOutputs(ctx *pulumi.Context)\n```\nExportRunnerOutputs writes the runner name and target (org or repo URL) as Pulumi stack outputs. Call this from deploy() after SetupRunner so the destroy path can read them back without re-parsing CLI flags.\n\n```go\nfunc GenerateInstallationToken(appID, installationID, privateKeyPath string) (string, error)\n```\nGenerateInstallationToken exchanges GitHub App credentials for a short-lived installation access token suitable for runner management API calls.\n\n```go\nfunc GenerateOrgRegistrationToken(pat, org string) (string, error)\n```\nGenerateOrgRegistrationToken calls the GitHub API to create a short-lived runner registration token for the given organization. pat is a Personal Access Token with admin:org scope.\n\n```go\nfunc GenerateRegistrationToken(pat, repoURL string) (string, error)\n```\nGenerateRegistrationToken calls the GitHub API to create a short-lived runner registration token for the given repository. pat is a Personal Access Token with repo admin scope. repoURL is in the form \"owner/repo\" or \"[https://github.com/owner/repo](https://github.com/owner/repo)\".\n\n```go\nfunc GetManagementToken() (string, error)\n```\nGetManagementToken returns a GitHub token suitable for runner management. For GitHub App auth it generates a fresh installation access token. For PAT auth it reads GITHUB\\_TOKEN from the environment.\n\n```go\nfunc GetToken() string\n```\n\n```go\nfunc Init(args *GithubRunnerArgs)\n```\n\n```go\nfunc SetupRunner(ctx *pulumi.Context, args *GithubRunnerArgs) error\n```\nSetupRunner fetches a runner registration token from the GitHub App and sets it on args. It is a no-op when args is nil, Token is already set, or AppID is empty (PAT / plain-token paths are handled in params).\n\n```go\nfunc TryDeregister(pat string, outputs map[string]interface{})\n```\nTryDeregister removes the runner from GitHub using pat and the stack outputs previously written by ExportRunnerOutputs. It is best-effort: errors are logged as warnings so the caller's destroy always proceeds. outputs is the raw value map from auto.OutputMap (key → output.Value).\n\n## Types\n\n```go\ntype Arch string\n```\n\n```go\ntype GithubRunnerArgs struct {\n\tToken          string\n\tRepoURL        string\n\tOrg            string\n\tName           string\n\tPlatform       *Platform\n\tArch           *Arch\n\tLabels         []string\n\tUser           string\n\tAppID          string\n\tInstallationID string\n\tPrivateKeyPath string\n\tEphemeral      bool\n}\n```\n\n```go\nfunc GetRunnerArgs() *GithubRunnerArgs\n```\n\n```go\nfunc (args *GithubRunnerArgs) GetSetupScriptTemplate() string\n```\n\n```go\nfunc (args *GithubRunnerArgs) GetUserDataValues() *integrations.UserDataValues\n```\n\n```go\ntype Platform string\n```\n\n","path":"github.com/redhat-developer/mapt/pkg/integrations/github","name":"github","synopsis":"","isRedistributable":true}
