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

Use the HEAD method when fetching as it is more efficient and prevents 30-second delay when node exits. #219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajrussellsap
Copy link

As the fetchRetry function only seems to be used to find out what the latest release is - by letting github.com do a redirect - it would be more efficient to use HEAD rather than GET. This also fixes the issue where I am seeing a 30-second delay whenever the project-piper-action step is used from a workflow on a GitHub Enterprise server when a github.com token is not specified. I will raise a separate issue with details of the 30-second delay and link it to this PR.

I appreciate that you may not want to restrict fetch.ts to only being able to do HEAD requests so something a bit more flexible might be required - ie. being able to pass-in the request options to fetchRetry. In any case, I would really appreciate if you would consider using a HEAD request in whatever way is most practical.

Thanks

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 this pull request may close these issues.

1 participant