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, prFiles?: linter.GitHubFile[ listReviews: mockListReviews, dismissReview() {}, - - update() {}, }; const issuesClient = {