Skip to content

Commit

Permalink
fix dependencies language
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelef committed Nov 5, 2023
1 parent a73b3d8 commit cc41368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ func main() {

result, _ = clientGQL.GetAllStats(ctx, "surrealdb/surrealdb")
fmt.Println(result)

result, _ = clientGQL.GetAllStats(ctx, "fractalide/fractalide")
fmt.Println(result)
}
5 changes: 3 additions & 2 deletions repostats/gqlstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,9 @@ func (c *ClientGQL) GetAllStats(ctx context.Context, ghRepo string) (*stats.Repo
GetGoStats(ctx, c.restyClient, ghRepo, &result)
}

depFetcher := deps.CreateFetcher(result.Language)
depFetcher.GetDepsList(ctx, c.restyClient, ghRepo, &result)
if depFetcher := deps.CreateFetcher(result.Language); depFetcher != nil {
depFetcher.GetDepsList(ctx, c.restyClient, ghRepo, &result)
}

return &result, nil
}
Expand Down

0 comments on commit cc41368

Please sign in to comment.