Skip to content

Commit

Permalink
Refactor paginatorToArray to use AsyncIterable instead of AsyncIterab…
Browse files Browse the repository at this point in the history
…leIterator
  • Loading branch information
pelikhan committed Oct 1, 2024
1 parent e682a88 commit 4dbbb03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export async function githubCreatePullRequestReviews(
}

async function paginatorToArray<T, R>(

Check failure on line 414 in packages/core/src/github.ts

View workflow job for this annotation

GitHub Actions / build

The change from `AsyncIterableIterator<T>` to `AsyncIterable<T>` may cause issues if the `iterator` object was being used with `next()` method, which is not available on `AsyncIterable<T>`. Please ensure that the `iterator` object is only being used for iteration and not for manual control of the iteration process. 🧐

Check failure on line 414 in packages/core/src/github.ts

View workflow job for this annotation

GitHub Actions / build

The change in type may affect the functionality of the `paginatorToArray` function. If the function was expecting an `AsyncIterableIterator<T>`, changing it to `AsyncIterable<T>` might break the function if it was using properties or methods specific to `AsyncIterableIterator<T>`. Please ensure that the function can handle `AsyncIterable<T>` without any issues. 😊

Check failure on line 414 in packages/core/src/github.ts

View workflow job for this annotation

GitHub Actions / build

The change in the type of the `iterator` parameter in the `paginatorToArray` function has been made without any explanation or review comments. It would be helpful to provide a rationale for this change to help reviewers understand the intent behind it. This can also help in catching potential issues that might arise due to this change. 😇
iterator: AsyncIterableIterator<T>,
iterator: AsyncIterable<T>,
count: number,
iteratorItem: (item: T) => R[],
elementFilter?: (item: R) => boolean
Expand Down

0 comments on commit 4dbbb03

Please sign in to comment.