Skip to content

Commit

Permalink
fix tests and add any
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmaddock committed Jan 31, 2025
1 parent c856f13 commit 42ba776
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions spec/api-review-state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('api review', () => {
pulls: {
listReviews: jest.fn().mockReturnValue({ data: [] }),
},
paginate: (endpoint: Function) => endpoint()?.data,
} as any as Context['octokit'];

robot.load(handler);
Expand Down
4 changes: 2 additions & 2 deletions src/api-review-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ export async function addOrUpdateAPIReviewCheck(octokit: Context['octokit'], pr:

// Filter reviews by those from members of the API Working Group.
const reviews = (
await octokit.paginate(octokit.pulls.listReviews, {
await octokit.paginate(octokit.pulls.listReviews as any, {
owner,
repo,
pull_number: pr.number,
})
).filter(({ user, body }) => {
).filter(({ user, body }: any) => {
return members.includes(user!.login) && body.length !== 0;
});

Expand Down

0 comments on commit 42ba776

Please sign in to comment.