Skip to content

Commit 74f2473

Browse files
committed
lib/octokit: use https-proxy-agent
1 parent 5975ac1 commit 74f2473

File tree

3 files changed

+8
-27
lines changed

3 files changed

+8
-27
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
"dependencies": {
3131
"@actions/core": "^1.9.1",
3232
"@actions/github": "^5.0.3",
33-
"@octokit/action": "^4.0.7",
3433
"@octokit/core": "^4.0.5",
34+
"@octokit/plugin-paginate-rest": "^4.1.0",
3535
"@octokit/plugin-rest-endpoint-methods": "^6.3.0",
36+
"https-proxy-agent": "^5.0.1",
3637
"node-fetch": "^3.2.10"
3738
},
3839
"devDependencies": {

src/lib/octokit/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Octokit as Core} from '@octokit/core'
22
import {paginateRest} from '@octokit/plugin-paginate-rest'
33
import {legacyRestEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
4-
import ProxyAgent from 'proxy-agent'
4+
const HttpsProxyAgent = require("https-proxy-agent")
55

66
const DEFAULTS = {
77
baseUrl: getApiBaseUrl()
@@ -15,7 +15,7 @@ export const Octokit = Core.plugin(
1515
...DEFAULTS,
1616
...options,
1717
request: {
18-
agent: new ProxyAgent(),
18+
agent: new HttpsProxyAgent(),
1919
...options.request
2020
}
2121
}

yarn.lock

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -609,26 +609,6 @@
609609
"@nodelib/fs.scandir" "2.1.5"
610610
fastq "^1.6.0"
611611

612-
"@octokit/action@^4.0.7":
613-
version "4.0.7"
614-
resolved "https://registry.yarnpkg.com/@octokit/action/-/action-4.0.7.tgz#2c9d07149269b9b76d3cf08d311ea17a0ed4b9c7"
615-
integrity sha512-u2QVAK4kj5eSxuhjYIwesGMxPZ3Cnxx3smbR0XQi36nV/G0+f1ntUXjrwqY23FTHFP5YuMWSkbHhOZnkMmKFuA==
616-
dependencies:
617-
"@octokit/auth-action" "^2.0.0"
618-
"@octokit/core" "^4.0.0"
619-
"@octokit/plugin-paginate-rest" "^4.0.0"
620-
"@octokit/plugin-rest-endpoint-methods" "^6.0.0"
621-
"@octokit/types" "^7.0.0"
622-
https-proxy-agent "^5.0.1"
623-
624-
"@octokit/auth-action@^2.0.0":
625-
version "2.0.1"
626-
resolved "https://registry.yarnpkg.com/@octokit/auth-action/-/auth-action-2.0.1.tgz#6b4757713b5067c022787806c2c666affb73f716"
627-
integrity sha512-nh5UTN22jK7ll2BR+zS7yZXB6u9q2lsI+teOhdC/JCfws8guKjH3NynV0ipwERnwP11/GiHJ48Ji+HC5+R92ag==
628-
dependencies:
629-
"@octokit/auth-token" "^3.0.0"
630-
"@octokit/types" "^7.0.0"
631-
632612
"@octokit/auth-token@^2.4.4":
633613
version "2.5.0"
634614
resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz"
@@ -656,7 +636,7 @@
656636
before-after-hook "^2.2.0"
657637
universal-user-agent "^6.0.0"
658638

659-
"@octokit/core@^4.0.0", "@octokit/core@^4.0.5":
639+
"@octokit/core@^4.0.5":
660640
version "4.0.5"
661641
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.0.5.tgz#589e68c0a35d2afdcd41dafceab072c2fbc6ab5f"
662642
integrity sha512-4R3HeHTYVHCfzSAi0C6pbGXV8UDI5Rk+k3G7kLVNckswN9mvpOzW9oENfjfH3nEmzg8y3AmKmzs8Sg6pLCeOCA==
@@ -722,7 +702,7 @@
722702
dependencies:
723703
"@octokit/types" "^6.34.0"
724704

725-
"@octokit/plugin-paginate-rest@^4.0.0":
705+
"@octokit/plugin-paginate-rest@^4.1.0":
726706
version "4.1.0"
727707
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-4.1.0.tgz#670ac9ac369448c69a2371bfcd7e2b37d95534f2"
728708
integrity sha512-2O5K5fpajYG5g62wjzHR7/cWYaCA88CextAW3vFP+yoIHD0KEdlVMHfM5/i5LyV+JMmqiYW7w5qfg46FR+McNw==
@@ -737,7 +717,7 @@
737717
"@octokit/types" "^6.34.0"
738718
deprecation "^2.3.1"
739719

740-
"@octokit/plugin-rest-endpoint-methods@^6.0.0", "@octokit/plugin-rest-endpoint-methods@^6.3.0":
720+
"@octokit/plugin-rest-endpoint-methods@^6.3.0":
741721
version "6.3.0"
742722
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.3.0.tgz#81549334ce020169b84bd4a7fa2577e9d725d829"
743723
integrity sha512-qEu2wn6E7hqluZwIEUnDxWROvKjov3zMIAi4H4d7cmKWNMeBprEXZzJe8pE5eStUYC1ysGhD0B7L6IeG1Rfb+g==
@@ -1067,7 +1047,7 @@ acorn@^8.7.1:
10671047

10681048
agent-base@6:
10691049
version "6.0.2"
1070-
resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz"
1050+
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
10711051
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
10721052
dependencies:
10731053
debug "4"

0 commit comments

Comments
 (0)