Skip to content

Commit 74c1a9b

Browse files
fix(pr-linter): use github-actions bot to write to PRs
temp fix until we can get the aws-cdk-automation working correctly on this.
1 parent 291bf34 commit 74c1a9b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/pr-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
- name: Validate
3030
uses: ./tools/@aws-cdk/prlint
3131
env:
32-
GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
REPO_ROOT: ${{ github.workspace }}

tools/@aws-cdk/prlint/lint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class PullRequestLinter {
145145
private async dismissPreviousPRLinterReviews(): Promise<void> {
146146
const reviews = await this.client.listReviews(this.prParams);
147147
reviews.data.forEach(async (review: any) => {
148-
if (review.user?.login === 'aws-cdk-automation' && review.state !== 'DISMISSED') {
148+
if (review.user?.login === 'github-actions[bot]' && review.state !== 'DISMISSED') {
149149
await this.client.dismissReview({
150150
...this.prParams,
151151
review_id: review.id,

tools/@aws-cdk/prlint/test/lint.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function configureMock(issue: any, prFiles: any[] | undefined): linter.PullReque
314314
},
315315

316316
listReviews(_props: { _owner: string, _repo: string, _pull_number: number }) {
317-
return { data: [{ id: 1111122222, user: { login: 'aws-cdk-automation' }, state: 'CHANGES_REQUESTED' }] };
317+
return { data: [{ id: 1111122222, user: { login: 'github-actions[bot]' }, state: 'CHANGES_REQUESTED' }] };
318318
},
319319

320320
dismissReview() {},

0 commit comments

Comments
 (0)