From 41063ac19b0196d8ed4d3fa3f753d25458517874 Mon Sep 17 00:00:00 2001
From: Vinayak Kukreja <vinakuk@amazon.com>
Date: Thu, 19 Oct 2023 15:14:43 -0700
Subject: [PATCH] comment closing pr logic to first test the linter rule

Signed-off-by: Vinayak Kukreja <vinakuk@amazon.com>
---
 tools/@aws-cdk/prlint/lint.ts           | 16 +++++++++-------
 tools/@aws-cdk/prlint/test/lint.test.ts |  2 --
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/@aws-cdk/prlint/lint.ts b/tools/@aws-cdk/prlint/lint.ts
index 2a1aaa85b77ca..66e225fb8be81 100644
--- a/tools/@aws-cdk/prlint/lint.ts
+++ b/tools/@aws-cdk/prlint/lint.ts
@@ -270,13 +270,15 @@ export class PullRequestLinter {
       body,
     });
 
-    // Closing the PR if it is opened from main branch of author's fork
-    if (failureMessages.includes(PR_FROM_MAIN_ERROR)) {
-      await this.client.pulls.update({
-        ...this.prParams,
-        state: 'closed',
-      });
-    }
+    // Commenting this code to first test that linter rule works
+    // since this can lead to other PRs closing if not setup
+    // // Closing the PR if it is opened from main branch of author's fork
+    // if (failureMessages.includes(PR_FROM_MAIN_ERROR)) {
+    //   await this.client.pulls.update({
+    //     ...this.prParams,
+    //     state: 'closed',
+    //   });
+    // }
 
     throw new LinterError(body);
   }
diff --git a/tools/@aws-cdk/prlint/test/lint.test.ts b/tools/@aws-cdk/prlint/test/lint.test.ts
index 33746d1249954..42185b50f7368 100644
--- a/tools/@aws-cdk/prlint/test/lint.test.ts
+++ b/tools/@aws-cdk/prlint/test/lint.test.ts
@@ -911,8 +911,6 @@ function configureMock(pr: Subset<linter.GitHubPr>, prFiles?: linter.GitHubFile[
     listReviews: mockListReviews,
 
     dismissReview() {},
-
-    update() {},
   };
 
   const issuesClient = {