@@ -43,7 +43,7 @@ async function run_repo(owner, repo, octokit) {
4343 } ) ;
4444 } catch ( error ) {
4545 if ( error . status === 404 ) {
46- debug ( `https://github.com/${ owner } /${ repo } /blob/${ branchName } does not contain any workflows. ` ) ;
46+ debug ( `No workflows in https://github.com/${ owner } /${ repo } /blob/${ branchName } ` ) ;
4747 continue ;
4848 }
4949 throw ( `Error: ${ error . status } . Failed to retrieve contents for branch ${ branchName } ` , error ) ;
@@ -52,7 +52,7 @@ async function run_repo(owner, repo, octokit) {
5252 for ( const file of contents . data ) {
5353 const lowerCaseFile = file . name . toLowerCase ( ) ;
5454 if ( file . type === 'file' && ( lowerCaseFile . endsWith ( '.yml' ) || lowerCaseFile . endsWith ( '.yaml' ) ) ) {
55- debug ( `Retrieving workflow file https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } . ` ) ;
55+ debug ( `Retrieving workflow file https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } ` ) ;
5656 const fileContent = await octokit . rest . repos . getContent ( {
5757 owner,
5858 repo,
@@ -63,11 +63,11 @@ async function run_repo(owner, repo, octokit) {
6363 const content = Buffer . from ( fileContent . data . content , 'base64' ) . toString ( 'utf-8' ) ;
6464
6565 if ( ! content . includes ( 'pull_request_target' ) ) {
66- debug ( `No occurrence of 'pull_request_target' in https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } . ` ) ;
66+ debug ( `No occurrence of 'pull_request_target' in https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } ` ) ;
6767 continue ;
6868 }
6969
70- debug ( `Parsing workflow file https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } . ` ) ;
70+ debug ( `Parsing workflow file https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } ` ) ;
7171 const result = parseWorkflow (
7272 {
7373 name : file . name ,
@@ -77,17 +77,17 @@ async function run_repo(owner, repo, octokit) {
7777 ) ;
7878 if ( result . value === undefined ) {
7979 found = true ;
80- console . log ( `Failed to parse https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } . ` ) ;
80+ console . log ( `Failed to parse https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } ` ) ;
8181 continue ;
8282 }
8383 const workflow = await convertWorkflowTemplate ( result . context , result . value ) ;
8484 if ( workflow . events [ 'pull_request_target' ] === undefined ) {
85- debug ( `No usage of 'pull_request_target' in https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } . ` ) ;
85+ debug ( `No usage of 'pull_request_target' in https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } ` ) ;
8686 continue ;
8787 }
8888
8989 if ( workflow . events [ 'pull_request_target' ] . branches !== undefined ) {
90- debug ( `https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } is using branch filter ${ JSON . stringify ( workflow . events [ 'pull_request_target' ] . branches ) } .` ) ;
90+ debug ( `Skipping https://github.com/${ owner } /${ repo } /blob/${ branchName } /${ file . path } - uses branch filter ${ JSON . stringify ( workflow . events [ 'pull_request_target' ] . branches ) } .` ) ;
9191 continue ;
9292 }
9393
0 commit comments