(ctx context.Context, repo string)
| 213 | } |
| 214 | |
| 215 | func (g *githubClient) DeleteManagedRepo(ctx context.Context, repo string) error { |
| 216 | // get managed org client |
| 217 | id, err := g.ManagedOrgInstallationID() |
| 218 | if err != nil { |
| 219 | return fmt.Errorf("failed to get managed org installation ID: %w", err) |
| 220 | } |
| 221 | client := g.InstallationClient(id, nil) |
| 222 | |
| 223 | _, err = client.Repositories.Delete(ctx, g.managedAcct, repo) |
| 224 | if err != nil { |
| 225 | return fmt.Errorf("failed to delete repo: %w", err) |
| 226 | } |
| 227 | return nil |
| 228 | } |
| 229 | |
| 230 | func (g *githubClient) ManagedOrgInstallationID() (int64, error) { |
| 231 | return g.managedOrgInstallationID, g.managedOrgFetchError |
nothing calls this directly
no test coverage detected