From 984debe929fad8e248489e2a1d691b0635e6b120 Mon Sep 17 00:00:00 2001 From: sadayuki-matsuno Date: Wed, 1 Mar 2023 16:58:11 +0900 Subject: [PATCH] fix(detector/github) change timeout 10s to 10m (#1616) --- detector/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detector/github.go b/detector/github.go index a69afc82..69903144 100644 --- a/detector/github.go +++ b/detector/github.go @@ -225,7 +225,7 @@ func fetchDependencyGraph(r *models.ScanResult, httpClient *http.Client, owner, "query { repository(owner:\"%s\", name:\"%s\") { url dependencyGraphManifests(first: %d, withDependencies: true%s) { pageInfo { endCursor hasNextPage } edges { node { blobPath filename repository { url } parseable exceedsMaxSize dependenciesCount dependencies%s { pageInfo { endCursor hasNextPage } edges { node { packageName packageManager repository { url } requirements hasDependencies } } } } } } } }"}` queryStr := fmt.Sprintf(queryFmt, owner, repo, 100, after, dependenciesAfter) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute) req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.github.com/graphql", bytes.NewBuffer([]byte(queryStr)),