File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -298,12 +298,13 @@ const themeNameAlreadyExists = (name) => {
298
298
return themes [ name ] !== undefined ;
299
299
} ;
300
300
301
+ const DRY_RUN = process . env . DRY_RUN === "true" || false ;
302
+
301
303
/**
302
304
* Main function.
303
305
*/
304
306
export const run = async ( prNumber ) => {
305
307
try {
306
- const dryRun = process . env . DRY_RUN === "true" || false ;
307
308
debug ( "Retrieve action information from context..." ) ;
308
309
debug ( `Context: ${ inspect ( github . context ) } ` ) ;
309
310
let commentBody = `
@@ -513,7 +514,7 @@ export const run = async (prNumber) => {
513
514
// Create or update theme-preview comment.
514
515
debug ( "Create or update theme-preview comment..." ) ;
515
516
let comment_url ;
516
- if ( ! dryRun ) {
517
+ if ( ! DRY_RUN ) {
517
518
comment_url = await upsertComment ( octokit , {
518
519
comment_id : comment ?. id ,
519
520
issue_number : pullRequestId ,
@@ -535,7 +536,7 @@ export const run = async (prNumber) => {
535
536
const reviewReason = themesValid
536
537
? undefined
537
538
: INVALID_REVIEW_COMMENT ( comment_url ) ;
538
- if ( ! dryRun ) {
539
+ if ( ! DRY_RUN ) {
539
540
await addReview (
540
541
octokit ,
541
542
pullRequestId ,
@@ -558,7 +559,7 @@ export const run = async (prNumber) => {
558
559
}
559
560
} catch ( error ) {
560
561
debug ( "Set review state to `REQUEST_CHANGES` and add `invalid` label..." ) ;
561
- if ( ! dryRun ) {
562
+ if ( ! DRY_RUN ) {
562
563
await addReview (
563
564
octokit ,
564
565
pullRequestId ,
You can’t perform that action at this time.
0 commit comments