Skip to content

Commit

Permalink
chore(pr-linter): use github-actions bot to write to PRs (aws#22152)
Browse files Browse the repository at this point in the history
temp fix until we can get the aws-cdk-automation working correctly on this.


----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
TheRealAmazonKendra authored and madeline-k committed Oct 10, 2022
1 parent eccc260 commit b1d8fd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: Validate
uses: ./tools/@aws-cdk/prlint
env:
GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_ROOT: ${{ github.workspace }}
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class PullRequestLinter {
private async dismissPreviousPRLinterReviews(): Promise<void> {
const reviews = await this.client.listReviews(this.prParams);
reviews.data.forEach(async (review: any) => {
if (review.user?.login === 'aws-cdk-automation' && review.state !== 'DISMISSED') {
if (review.user?.login === 'github-actions[bot]' && review.state !== 'DISMISSED') {
await this.client.dismissReview({
...this.prParams,
review_id: review.id,
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/test/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function configureMock(issue: any, prFiles: any[] | undefined): linter.PullReque
},

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

dismissReview() {},
Expand Down

0 comments on commit b1d8fd4

Please sign in to comment.