generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Compare base and ref when token is empty #133
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Florent Poinsard <[email protected]>
3 tasks
mitchell-codecov
added a commit
to mitchell-codecov/paths-filter
that referenced
this pull request
Jun 15, 2022
@dorny Can this be merged in? Without it we're effectively blocked from using the action on PRs. |
2 tasks
I am happy to fix the conflict @dorny if we're good to merge. |
Released as v3.0.1 |
Thanks @dorny ! 🙏🏻 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
After we started using
paths-filter
on all our +80 workflows, we quickly saw API rate limit errors. The exact issue is detailed in both #108 and #73. In our case, this issue would arise pretty quickly considering that each workflow usespaths-filter
and thus executes at least one API call. The 1000 requests/hour limit can quickly be met after a dozen of commits.To alleviate this issue, we considered not using the GitHub API at all. In fact, a simple
git diff
should be sufficient. The documentation says we can settoken
to an empty string to force the use of thegit
command. Doing so resulted inpaths-filter
executing thegit
command below. That command would return an excessively large number of modified files (even though they were not modified by PR/commit). The screenshot below exhibits this large number of modified files.This PR fixes this issue by using
getChanges
instead ofgetChangesInLastCommit
. Turns out thatgetChanges
is more accurate since we can provide a range that starts at the base and ends at the head/current commit.We started using this fix in vitessio/vitess#10106. The fix seems to have alleviated all of the issues we were previously seeing.
Related Issues