MCPcopy Create free account
hub / github.com/cloudbase/garm / CreateEntityHook

Method CreateEntityHook

util/github/client.go:132–141  ·  view source on GitHub ↗
(ctx context.Context, hook *github.Hook)

Source from the content-addressed store, hash-verified

130}
131
132func (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
143func (g *githubClient) DeleteEntityHook(ctx context.Context, id int64) (ret *github.Response, err error) {
144 metrics.GithubOperationCount.WithLabelValues(

Callers

nothing calls this directly

Calls 2

createGiteaEntityHookMethod · 0.95

Tested by

no test coverage detected