MCPcopy Index your code
hub / github.com/crashappsec/github-analyzer / NewRepository

Function NewRepository

pkg/github/repo/repo.go:26–43  ·  view source on GitHub ↗
(
	ctx context.Context,
	client *github.Client,
	backoff *backoff.Backoff,
	raw *github.Repository)

Source from the content-addressed store, hash-verified

24}
25
26func NewRepository(
27 ctx context.Context,
28 client *github.Client,
29 backoff *backoff.Backoff,
30 raw *github.Repository) (*Repository, error) {
31 // FIXME change to not use unmarshal w/ reflection or plain initializer
32 var stats types.RepoCoreStats
33 orgJson, _ := json.Marshal(raw)
34 _ = json.Unmarshal(orgJson, &stats)
35
36 return &Repository{
37 info: raw,
38 client: client,
39 backoff: backoff,
40 paginationSize: 100,
41 CoreStats: &stats,
42 }, nil
43}
44
45func (repo *Repository) GetWebhooks(
46 ctx context.Context) (map[types.WebhookID]types.Webhook, error) {

Callers 1

GetRepositoriesMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected