This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ This behavior can be further customized using environment variables: setting LGT
3333to 'false' disables the GOPATH set-up, CODEQL_EXTRACTOR_GO_BUILD_COMMAND (or alternatively
3434LGTM_INDEX_BUILD_COMMAND), can be set to a newline-separated list of commands to run in order to
3535install dependencies, and LGTM_INDEX_IMPORT_PATH can be used to override the package import path,
36- which is otherwise inferred from the SEMMLE_REPO_URL environment variable .
36+ which is otherwise inferred from the SEMMLE_REPO_URL or GITHUB_REPOSITORY environment variables .
3737
3838In resource-constrained environments, the environment variable CODEQL_EXTRACTOR_GO_MAX_GOROUTINES
3939(or its legacy alias SEMMLE_MAX_GOROUTINES) can be used to limit the number of parallel goroutines
@@ -92,9 +92,15 @@ func getImportPath() (importpath string) {
9292 if importpath == "" {
9393 repourl := os .Getenv ("SEMMLE_REPO_URL" )
9494 if repourl == "" {
95- return ""
95+ githubrepo := os .Getenv ("GITHUB_REPOSITORY" )
96+ if githubrepo == "" {
97+ return ""
98+ } else {
99+ importpath = "github.com/" + githubrepo
100+ }
101+ } else {
102+ importpath = getImportPathFromRepoURL (repourl )
96103 }
97- importpath = getImportPathFromRepoURL (repourl )
98104 }
99105 log .Printf ("Import path is %s\n " , importpath )
100106 return
You can’t perform that action at this time.
0 commit comments