{"modulePath":"github.com/inference-gateway/cli","version":"v0.178.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package githubsetup\n\nPackage githubsetup implements agentdomain.GitHubSetupService for the GitHub Action CI setup flow. Every git/gh command runs through the injected CommandRunner under a 30-second timeout so a wedged subprocess cannot hang the UI.\n\n## Constants\n\n```go\nconst (\n\tInferActionVersion          = \"v0.48.0\"\n\tCheckoutActionVersion       = \"v7.0.1\"\n\tAppTokenActionVersion       = \"v3.2.0\"\n\tUploadArtifactActionVersion = \"v7.0.1\"\n\tDefaultWorkflowModel        = \"ollama_cloud/deepseek-v4-flash:preview\"\n)\n```\nVersion pins and defaults for the generated .github/workflows/infer.yml. Bumping any of these is a one-line change picked up by both templates.\n\n## Types\n\n```go\ntype CommandRunner interface {\n\tRun(ctx context.Context, name string, args ...string) ([]byte, error)\n}\n```\nCommandRunner is an injectable interface for running subprocesses. Tests supply a fake runner so no real gh/git calls are needed.\n\n```go\ntype RealRunner struct{}\n```\nRealRunner shells out using exec.CommandContext.\n\n```go\nfunc (r *RealRunner) Run(ctx context.Context, name string, args ...string) ([]byte, error)\n```\nRun returns stdout on success and stderr on failure, so callers that embed the bytes in an error surface the real git/gh diagnostic.\n\n```go\ntype Service struct {\n\t// contains filtered or unexported fields\n}\n```\nService implements agentdomain.GitHubSetupService.\n\n```go\nfunc NewService(runner CommandRunner) *Service\n```\nNewService creates a new Service with the given runner.\n\n```go\nfunc (s *Service) CheckOrgSecretsExist(orgName string) (bool, error)\n```\nCheckOrgSecretsExist checks whether INFER\\_APP\\_ID and INFER\\_APP\\_PRIVATE\\_KEY secrets exist for the given org.\n\n```go\nfunc (s *Service) GenerateGithubActionWorkflowContent() string\n```\nGenerateGithubActionWorkflowContent generates the GitHub App-based workflow YAML content with org-level secrets.\n\n```go\nfunc (s *Service) GenerateStandardWorkflowContent() string\n```\nGenerateStandardWorkflowContent generates the standard (github-actions\\[bot]) workflow YAML content.\n\n```go\nfunc (s *Service) GetCurrentRepo() (string, error)\n```\nGetCurrentRepo returns the current GitHub repository name with owner.\n\n```go\nfunc (s *Service) IsOrgRepo(repo string) (bool, error)\n```\nIsOrgRepo checks whether the given repo belongs to a GitHub organization.\n\n```go\nfunc (s *Service) PreparePRCreation(repo, workflowPath string) (string, error)\n```\nPreparePRCreation creates a branch, commits the workflow file, pushes it, and opens a PR creation page. It returns the compare URL.\n\n```go\nfunc (s *Service) SetOrgSecret(orgName, name, value string) error\n```\nSetOrgSecret sets a GitHub organization-level secret.\n\n```go\nfunc (s *Service) WriteWorkflowFile(path, content string) error\n```\nWriteWorkflowFile writes the workflow content to the specified path.\n\n","path":"github.com/inference-gateway/cli/internal/services/githubsetup","name":"githubsetup","synopsis":"Package githubsetup implements agentdomain.GitHubSetupService for the GitHub Action CI setup flow.","isRedistributable":true}
