(ctx context.Context, hook *github.Hook)
| 130 | } |
| 131 | |
| 132 | func (g *githubClient) CreateEntityHook(ctx context.Context, hook *github.Hook) (ret *github.Hook, err error) { |
| 133 | switch g.entity.Credentials.ForgeType { |
| 134 | case params.GithubEndpointType: |
| 135 | return g.createGithubEntityHook(ctx, hook) |
| 136 | case params.GiteaEndpointType: |
| 137 | return g.createGiteaEntityHook(ctx, hook) |
| 138 | default: |
| 139 | return nil, errors.New("invalid entity type") |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | func (g *githubClient) DeleteEntityHook(ctx context.Context, id int64) (ret *github.Response, err error) { |
| 144 | metrics.GithubOperationCount.WithLabelValues( |
nothing calls this directly
no test coverage detected