Open ataylorme opened 7 months ago
Thanks for looking at this, @ataylorme!
I think this is the reason for #54.
I've gone and added some test variables to pull the data from the PR experiencing the problem.
I also rebuilt the action after your changes using npm run prepare
. You'll need to do that every time you push, otherwise your changes won't be tested by the test workflows.
I took another pass at this in #58 looking at the examples in the plugin README file. It's also not there yet.
I did see one thing in the documentation somewhere (struggling to find it again for reference) that made me think we may need to break off a few queries. Nested pagination is not supported. We may need to either:
after: 100
for the rest.@desrosj to truly sort this out, and have confidence in a solution, I would:
actions/typescript-action
is a great referencegetContributorData
to smaller methods with single responsibility and use getContributorData
to call those (e.g. getPullRequestComments
, get closingIssuesReferences
, etc.). Some advantages are:
@ octokit/types.ts
combined with 1 and 2 will give strict typing that cannot be achieved with GraphQLWhile a single, large graphQL query may be more efficient in reducing the number of API requests the changes above would make the code more maintainable and testable.
What?
Add pagination support for PR comments
Why?
Addresses #41
How?
Use
@octokit/plugin-paginate-graphql
with plugin support from@actions/core
Notes
I am not sure if this will work as-is. Based on this comment I think the rather large GraphQL query may need to be broken down into multiple, smaller queries for effective pagination.
Probably one GraphQL for each set of PR info needed such as commits, comments, reviews, etc.