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

feat: add https proxy env support #329

Merged
merged 6 commits into from
Aug 1, 2021

Commits on Jul 24, 2021

  1. Configuration menu
    Copy the full SHA
    56cef03 View commit details
    Browse the repository at this point in the history
  2. Add autoProxyAgent plugin to respect HTTPS_PROXY env var

    When a there's either a HTTPS_PROXY or https_proxy environment variable,
    the autoProxyAgent plugin creates a HttpsProxyAgent with the value of the
    environment variable and includes it to the request options on the before
    "request" hook.
    copperwall committed Jul 24, 2021
    Configuration menu
    Copy the full SHA
    5cd5d89 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2021

  1. Configuration menu
    Copy the full SHA
    fa3b507 View commit details
    Browse the repository at this point in the history
  2. Set options.request.agent as actions.js default instead of plugin

    This removes the code that hooks into the request lifecycle and instead
    just sets the agent as a default based on the HTTPS_PROXY environment
    variable when the Octokit class is instantiated.
    
    Setting the options.request.agent field in the plugin had an issue where
    the agent field wasn't being passed to the fetch wrapper in core.js,
    since the request options were being set before the plugins were run.
    
    The reason the defaults are passed as a function value instead of an
    object is that it was difficult to test different behavior based on env
    variables in src/index.ts because it was only run once during the import
    at the top of the test file. Using the function lets us change the
    environment variable in between test cases and lets the change get
    reflected when octokit is instantiated, and not when it's imported.
    copperwall committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    ca8d2bc View commit details
    Browse the repository at this point in the history
  3. Prefer Octokit constructor options over actions.js defaults

    This lets a user override the agent proxy value when constructing a new octokit
    instance
    copperwall committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    f98ca5a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    547fda2 View commit details
    Browse the repository at this point in the history