MCPcopy Index your code
hub / github.com/rilldata/rill / DeleteManagedRepo

Method DeleteManagedRepo

admin/github.go:215–228  ·  view source on GitHub ↗
(ctx context.Context, repo string)

Source from the content-addressed store, hash-verified

213}
214
215func (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
230func (g *githubClient) ManagedOrgInstallationID() (int64, error) {
231 return g.managedOrgInstallationID, g.managedOrgFetchError

Callers

nothing calls this directly

Calls 4

InstallationClientMethod · 0.95
ErrorfMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected