@@ -18,7 +18,9 @@ async fn main() -> Result<()> {
1818
1919 debug ! ( "Action :: {action:?}" ) ;
2020
21- let client = action. octocrab ( ) ?;
21+ // Use a client without a token to not use Action' token which will fail
22+ // as the token won't have access to the CodeQL repository.
23+ let octocrab = action. octocrab_without_token ( ) ?;
2224
2325 let cwd = action
2426 . working_directory ( )
@@ -37,10 +39,6 @@ async fn main() -> Result<()> {
3739 log:: debug!( "CodeQL :: {codeql:?}" ) ;
3840
3941 if !codeql. is_installed ( ) . await {
40- // Use a client without a token to not use Action' token which will fail
41- // as the token won't have access to the CodeQL repository.
42- let octocrab = action. octocrab_without_token ( ) ?;
43-
4442 let codeql_version = action. codeql_version ( ) ;
4543 log:: info!( "CodeQL not installed, installing `{codeql_version}`..." ) ;
4644 codeql
@@ -62,18 +60,24 @@ async fn main() -> Result<()> {
6260 . extractor_repository ( )
6361 . context ( "Failed to get extractor repository" ) ?;
6462
65- let extractor_path = cwd . join ( ".codeql" ) . join ( "extractors" ) ;
63+ let extractor_path = codeql_dir . join ( "extractors" ) ;
6664 if !extractor_path. exists ( ) {
67- std:: fs:: create_dir ( & extractor_path)
65+ std:: fs:: create_dir_all ( & extractor_path)
6866 . with_context ( || format ! ( "Failed to create directory {extractor_path:?}" ) ) ?;
6967 info ! ( "Created Extractor Directory :: {extractor_path:?}" ) ;
7068 }
7169
7270 let mut extractors: Vec < ( CodeQLExtractor , RepositoryReference ) > = Vec :: new ( ) ;
7371
7472 for extractor_repo in extractor_repos. iter ( ) {
73+ log:: info!(
74+ "Fetching extractor from repository: {} / {}" ,
75+ extractor_repo. owner,
76+ extractor_repo. name
77+ ) ;
78+
7579 let extractor_path = extractors:: fetch_extractor (
76- & client ,
80+ & octocrab ,
7781 extractor_repo,
7882 action. attestation ( ) ,
7983 & extractor_path,
0 commit comments