Skip to content

Commit 8e4bc60

Browse files
Merge branch 'main' into auto-cherry-pick
2 parents 1512f8f + d32973e commit 8e4bc60

File tree

5 files changed

+47
-14
lines changed

5 files changed

+47
-14
lines changed

dist/index.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,6 +3696,7 @@ class Context {
36963696
this.action = process.env.GITHUB_ACTION;
36973697
this.actor = process.env.GITHUB_ACTOR;
36983698
this.job = process.env.GITHUB_JOB;
3699+
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
36993700
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
37003701
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
37013702
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
@@ -4572,7 +4573,7 @@ class HttpClient {
45724573
}
45734574
const usingSsl = parsedUrl.protocol === 'https:';
45744575
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
4575-
token: `${proxyUrl.username}:${proxyUrl.password}`
4576+
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
45764577
})));
45774578
this._proxyAgentDispatcher = proxyAgent;
45784579
if (usingSsl && this._ignoreSslError) {
@@ -4686,11 +4687,11 @@ function getProxyUrl(reqUrl) {
46864687
})();
46874688
if (proxyVar) {
46884689
try {
4689-
return new URL(proxyVar);
4690+
return new DecodedURL(proxyVar);
46904691
}
46914692
catch (_a) {
46924693
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
4693-
return new URL(`http://${proxyVar}`);
4694+
return new DecodedURL(`http://${proxyVar}`);
46944695
}
46954696
}
46964697
else {
@@ -4749,6 +4750,19 @@ function isLoopbackAddress(host) {
47494750
hostLower.startsWith('[::1]') ||
47504751
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
47514752
}
4753+
class DecodedURL extends URL {
4754+
constructor(url, base) {
4755+
super(url, base);
4756+
this._decodedUsername = decodeURIComponent(super.username);
4757+
this._decodedPassword = decodeURIComponent(super.password);
4758+
}
4759+
get username() {
4760+
return this._decodedUsername;
4761+
}
4762+
get password() {
4763+
return this._decodedPassword;
4764+
}
4765+
}
47524766
//# sourceMappingURL=proxy.js.map
47534767

47544768
/***/ }),

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4061,6 +4061,7 @@ class Context {
40614061
this.action = process.env.GITHUB_ACTION;
40624062
this.actor = process.env.GITHUB_ACTOR;
40634063
this.job = process.env.GITHUB_JOB;
4064+
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
40644065
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
40654066
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
40664067
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
@@ -4937,7 +4938,7 @@ class HttpClient {
49374938
}
49384939
const usingSsl = parsedUrl.protocol === 'https:';
49394940
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
4940-
token: `${proxyUrl.username}:${proxyUrl.password}`
4941+
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
49414942
})));
49424943
this._proxyAgentDispatcher = proxyAgent;
49434944
if (usingSsl && this._ignoreSslError) {
@@ -5051,11 +5052,11 @@ function getProxyUrl(reqUrl) {
50515052
})();
50525053
if (proxyVar) {
50535054
try {
5054-
return new URL(proxyVar);
5055+
return new DecodedURL(proxyVar);
50555056
}
50565057
catch (_a) {
50575058
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
5058-
return new URL(`http://${proxyVar}`);
5059+
return new DecodedURL(`http://${proxyVar}`);
50595060
}
50605061
}
50615062
else {
@@ -5114,6 +5115,19 @@ function isLoopbackAddress(host) {
51145115
hostLower.startsWith('[::1]') ||
51155116
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
51165117
}
5118+
class DecodedURL extends URL {
5119+
constructor(url, base) {
5120+
super(url, base);
5121+
this._decodedUsername = decodeURIComponent(super.username);
5122+
this._decodedPassword = decodeURIComponent(super.password);
5123+
}
5124+
get username() {
5125+
return this._decodedUsername;
5126+
}
5127+
get password() {
5128+
return this._decodedPassword;
5129+
}
5130+
}
51175131
//# sourceMappingURL=proxy.js.map
51185132

51195133
/***/ }),

dist/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)