Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate over all comments #81

Open
eseiler opened this issue Feb 13, 2023 · 2 comments · May be fixed by #82
Open

Iterate over all comments #81

eseiler opened this issue Feb 13, 2023 · 2 comments · May be fixed by #82

Comments

@eseiler
Copy link

eseiler commented Feb 13, 2023

Thank you for this action!

Currently, only the first 30 comments can be hidden.
When the comments are queried here

const resp = await this.octokit.rest.issues.listComments({

the default of 30 is used (see docs).

To get all comments, we would have to get the comments repeatedly, i.e. per_page=100 and then query consecutive pages until we are done.

@kanga333
Copy link
Owner

Thanks for the report. I'll try to implement it when I have some time. Of course, pull requests are always welcome 👍

@barracudarin
Copy link

barracudarin commented Nov 7, 2023

@kanga333 i've put up a pull request that should add pagination. i don't have a full Typescript env set up on my machine, so I wasn't able to verify the tests work.

But they should be (hopefully) most of the way there.

edit: i set up my environment and fixed up everything. the tests pass locally and the action works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants