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

Fixes github.proxy not working (#863) #893

Merged
merged 1 commit into from Apr 14, 2022
Merged

Conversation

dgcofer
Copy link
Contributor

@dgcofer dgcofer commented Apr 14, 2022

Based on a recent change in Octokits docs[1], in order for it to use a
configured proxy you must pass another request.agent into the Octokit
constructor. This change adds the proxy-agent lib as suggested by
Octokits docs.

Note that with this implmentation, the http_proxy or https_proxy
environment variables alone will NOT work. Instead one must explicitly
set the value in the github.proxy option passed to release-it. This is
to stay inline with current behavior[2].

[1] octokit/octokit.js@2090c85
[2] https://github.com/release-it/release-it/blob/14.14.2/docs/github-releases.md#proxy

Based on a recent change in Octokits docs[1], in order for it to use a
configured proxy you must pass another request.agent into the Octokit
constructor. This change adds the `proxy-agent` lib as suggested by
Octokits docs.

Note that with this implmentation, the `http_proxy` or `https_proxy`
environment variables alone will NOT work. Instead one must explicitly
set the value in the `github.proxy` option passed to release-it. This is
to stay inline with current behavior[2].

[1] octokit/octokit.js@2090c85
[2] https://github.com/release-it/release-it/blob/14.14.2/docs/github-releases.md#proxy
@dgcofer
Copy link
Contributor Author

dgcofer commented Apr 14, 2022

This PR is to address #863

releaseUrl,
'https://custom.example.org/user/repo/releases/new?tag=2.0.2&title=The+Launch&body=It+happened&prerelease=false'
);
t.is(github.options.proxy, 'http://proxy.example.org:8181');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't really to sure on how to test for this scenario, Ava is not my forte 😉
I welcome any suggestions.

@webpro webpro merged commit 1fe1afa into release-it:master Apr 14, 2022
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.

None yet

2 participants