@@ -14,7 +14,7 @@ import warmServer from '../../lib/warm-server.js'
1414import renderContent from '../../lib/render-content/index.js'
1515import { deprecated } from '../../lib/enterprise-server-releases.js'
1616import excludedLinks from '../../lib/excluded-links.js'
17- import { getEnvInputs } from './lib/get-env-inputs.js'
17+ import { getEnvInputs , boolEnvVar } from './lib/get-env-inputs.js'
1818import { debugTimeEnd , debugTimeStart } from './lib/debug-time-taken.js'
1919import { uploadArtifact as uploadArtifactLib } from './lib/upload-artifact.js'
2020import github from '../../script/helpers/github.js'
@@ -52,19 +52,8 @@ const deprecatedVersionPrefixesRegex = new RegExp(
5252// When this file is invoked directly from action as opposed to being imported
5353if ( import . meta. url . endsWith ( process . argv [ 1 ] ) ) {
5454 // Optional env vars
55- const {
56- ACTION_RUN_URL ,
57- CREATE_REPORT ,
58- CHECK_EXTERNAL_LINKS ,
59- LEVEL ,
60- SHOULD_COMMENT ,
61- COMMENT_LIMIT_TO_EXTERNAL_LINKS ,
62- FAIL_ON_FLAW ,
63- FILES_CHANGED ,
64- REPORT_REPOSITORY ,
65- REPORT_AUTHOR ,
66- REPORT_LABEL ,
67- } = process . env
55+ const { ACTION_RUN_URL , LEVEL , FILES_CHANGED , REPORT_REPOSITORY , REPORT_AUTHOR , REPORT_LABEL } =
56+ process . env
6857
6958 const octokit = github ( )
7059
@@ -86,15 +75,15 @@ if (import.meta.url.endsWith(process.argv[1])) {
8675 verbose : true ,
8776 linkReports : true ,
8877 checkImages : true ,
89- patient : true ,
78+ patient : boolEnvVar ( 'PATIENT' ) ,
9079 random : false ,
9180 language : 'en' ,
9281 actionUrl : ACTION_RUN_URL ,
93- checkExternalLinks : CHECK_EXTERNAL_LINKS === 'true' ,
94- shouldComment : Boolean ( JSON . parse ( SHOULD_COMMENT ) ) ,
95- commentLimitToExternalLinks : COMMENT_LIMIT_TO_EXTERNAL_LINKS === 'true' ,
96- failOnFlaw : FAIL_ON_FLAW === 'true' ,
97- createReport : CREATE_REPORT === 'true' ,
82+ checkExternalLinks : boolEnvVar ( ' CHECK_EXTERNAL_LINKS' ) ,
83+ shouldComment : boolEnvVar ( ' SHOULD_COMMENT' ) ,
84+ commentLimitToExternalLinks : boolEnvVar ( ' COMMENT_LIMIT_TO_EXTERNAL_LINKS' ) ,
85+ failOnFlaw : boolEnvVar ( ' FAIL_ON_FLAW' ) ,
86+ createReport : boolEnvVar ( ' CREATE_REPORT' ) ,
9887 reportRepository : REPORT_REPOSITORY ,
9988 reportLabel : REPORT_LABEL ,
10089 reportAuthor : REPORT_AUTHOR ,
@@ -839,7 +828,7 @@ async function innerFetch(core, url, config = {}) {
839828 // So there's no point in trying more attempts than 3 because it would
840829 // just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000)
841830 const retry = {
842- limit : patient ? 5 : 2 ,
831+ limit : patient ? 6 : 2 ,
843832 }
844833 const timeout = { request : patient ? 10000 : 2000 }
845834
0 commit comments