You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't check for PR_READY_STATE and PR_FILTER until further down, so this API call is made for all PRs that are still open. However, many of these checks would have returned false early on if they were checked first.
I don't think compareCommitsWithBasehead needs to run unless all the conditions pass? Could we change it so that it doesn't run until the end?
The text was updated successfully, but these errors were encountered:
charlietsai
changed the title
Prioritize PR checks that don't require REST API call first
Prioritize PR checks that don't require REST API calls first
Dec 22, 2023
Similar to #305, I'm looking into ways to reduce API calls made.
I can see here in
prNeedsUpdate
:autoupdate/src/autoupdater.ts
Line 245 in 01c66da
that we have this API call
this.octokit.rest.repos.compareCommitsWithBasehead
relatively early on:autoupdate/src/autoupdater.ts
Lines 263 to 272 in 01c66da
We don't check for
PR_READY_STATE
andPR_FILTER
until further down, so this API call is made for all PRs that are still open. However, many of these checks would have returnedfalse
early on if they were checked first.I don't think
compareCommitsWithBasehead
needs to run unless all the conditions pass? Could we change it so that it doesn't run until the end?The text was updated successfully, but these errors were encountered: