(ctx context.Context)
| 264 | } |
| 265 | |
| 266 | func (client *Client) GetOrgRepoClient(ctx context.Context) (clients.RepoClient, error) { |
| 267 | dotGithubRepo, err := MakeGithubRepo(fmt.Sprintf("%s/.github", client.repourl.owner)) |
| 268 | if err != nil { |
| 269 | return nil, fmt.Errorf("error during MakeGithubRepo: %w", err) |
| 270 | } |
| 271 | |
| 272 | options := []Option{WithRoundTripper(client.repoClient.Client().Transport)} |
| 273 | if client.gitMode { |
| 274 | options = append(options, WithFileModeGit()) |
| 275 | } |
| 276 | c, err := NewRepoClient(ctx, options...) |
| 277 | if err != nil { |
| 278 | return nil, fmt.Errorf("create org repoclient: %w", err) |
| 279 | } |
| 280 | if err := c.InitRepo(dotGithubRepo, clients.HeadSHA, 0); err != nil { |
| 281 | return nil, fmt.Errorf("error during InitRepo: %w", err) |
| 282 | } |
| 283 | |
| 284 | return c, nil |
| 285 | } |
| 286 | |
| 287 | // ListWebhooks implements RepoClient.ListWebhooks. |
| 288 | func (client *Client) ListWebhooks() ([]clients.Webhook, error) { |
nothing calls this directly
no test coverage detected