MCPcopy Index your code
hub / github.com/git-bug/git-bug / mutate

Method mutate

bridge/github/client.go:34–46  ·  view source on GitHub ↗

mutate calls the github api with a graphql mutation and sends a core.ExportResult for each rate limiting event

(ctx context.Context, m interface{}, input githubv4.Input, vars map[string]interface{}, out chan<- core.ExportResult)

Source from the content-addressed store, hash-verified

32
33// mutate calls the github api with a graphql mutation and sends a core.ExportResult for each rate limiting event
34func (c *rateLimitHandlerClient) mutate(ctx context.Context, m interface{}, input githubv4.Input, vars map[string]interface{}, out chan<- core.ExportResult) error {
35 // prepare a closure for the mutation
36 mutFun := func(ctx context.Context) error {
37 return c.sc.Mutate(ctx, m, input, vars)
38 }
39 callback := func(msg string) {
40 select {
41 case <-ctx.Done():
42 case out <- core.NewExportRateLimiting(msg):
43 }
44 }
45 return c.callAPIAndRetry(ctx, mutFun, callback)
46}
47
48// queryImport calls the github api with a graphql query, and sends an ImportEvent for each rate limiting event
49func (c *rateLimitHandlerClient) queryImport(ctx context.Context, query interface{}, vars map[string]interface{}, importEvents chan<- ImportEvent) error {

Callers 7

createGithubIssueMethod · 0.80
addCommentGithubIssueMethod · 0.80
updateGithubIssueBodyMethod · 0.80

Calls 3

callAPIAndRetryMethod · 0.95
NewExportRateLimitingFunction · 0.92
MutateMethod · 0.65

Tested by

no test coverage detected