Skip to content

Commit cfc01fc

Browse files
committed
1 parent 858cf43 commit cfc01fc

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

actions/label-actions/dist/index.js

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,19 @@ class HttpClientResponse {
14271427
}));
14281428
});
14291429
}
1430+
readBodyBuffer() {
1431+
return __awaiter(this, void 0, void 0, function* () {
1432+
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
1433+
const chunks = [];
1434+
this.message.on('data', (chunk) => {
1435+
chunks.push(chunk);
1436+
});
1437+
this.message.on('end', () => {
1438+
resolve(Buffer.concat(chunks));
1439+
});
1440+
}));
1441+
});
1442+
}
14301443
}
14311444
exports.HttpClientResponse = HttpClientResponse;
14321445
function isHttps(requestUrl) {
@@ -1931,7 +1944,13 @@ function getProxyUrl(reqUrl) {
19311944
}
19321945
})();
19331946
if (proxyVar) {
1934-
return new URL(proxyVar);
1947+
try {
1948+
return new URL(proxyVar);
1949+
}
1950+
catch (_a) {
1951+
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
1952+
return new URL(`http://${proxyVar}`);
1953+
}
19351954
}
19361955
else {
19371956
return undefined;
@@ -5985,10 +6004,6 @@ function getNodeRequestOptions(request) {
59856004
agent = agent(parsedURL);
59866005
}
59876006

5988-
if (!headers.has('Connection') && !agent) {
5989-
headers.set('Connection', 'close');
5990-
}
5991-
59926007
// HTTP-network fetch step 4.2
59936008
// chunked encoding is handled by Node.js
59946009

@@ -6362,8 +6377,11 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
63626377

63636378
if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
63646379
response.once('close', function (hadError) {
6380+
// tests for socket presence, as in some situations the
6381+
// the 'socket' event is not triggered for the request
6382+
// (happens in deno), avoids `TypeError`
63656383
// if a data listener is still present we didn't end cleanly
6366-
const hasDataListener = socket.listenerCount('data') > 0;
6384+
const hasDataListener = socket && socket.listenerCount('data') > 0;
63676385

63686386
if (hasDataListener && !hadError) {
63696387
const err = new Error('Premature close');
@@ -6405,6 +6423,7 @@ exports.Headers = Headers;
64056423
exports.Request = Request;
64066424
exports.Response = Response;
64076425
exports.FetchError = FetchError;
6426+
exports.AbortError = AbortError;
64086427

64096428

64106429
/***/ }),
@@ -9616,13 +9635,13 @@ function wrappy (fn, cb) {
96169635
/***/ ((module) => {
96179636

96189637
module.exports = {
9619-
TEAM_ISSUE_P0: `This issue has been labelled as P0 which means it needs an immediate fix and release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
9638+
TEAM_ISSUE_P0: `This issue has been labelled as P0, which means it needs an immediate fix and release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
96209639

9621-
TEAM_ISSUE_P1: `This issue has been labelled as P1 which means a fix and release should be prioritized during working hours. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
9640+
TEAM_ISSUE_P1: `This issue has been labelled as P1, which means a fix and release should be prioritized during working hours. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
96229641

9623-
TEAM_ISSUE_P2: `This issue has been labelled as P2 which means a fix should be in the next scheduled release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
9642+
TEAM_ISSUE_P2: `This issue has been labelled as P2, which means a fix should be done after current project work. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
96249643

9625-
TEAM_ISSUE_P3: `This issue has been labelled as P3 which means this is a low priority issue for the next cooldown phase, and may be moved to the OSS repo. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
9644+
TEAM_ISSUE_P3: `This issue has been labelled as P3, which means this is a low priority issue and may be moved to the OSS repo. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
96269645

96279646
TEAM_ISSUE_OSS: `This issue has been labelled as \`oss\`, which means it is a rare or low priority issue suitable for our contributors to work on. The triager will move it to the correct repo soon.`,
96289647

@@ -10562,7 +10581,7 @@ async function main() {
1056210581
} else if (label.name === 'p1:priority') {
1056310582
await helpers.leaveComment(issue, comments.TEAM_ISSUE_P1);
1056410583
await helpers.removeNeedsTriageLabelIfOlder(issue);
10565-
} else if (label.name === 'p2:major') {
10584+
} else if (label.name === 'p2') {
1056610585
await helpers.leaveComment(issue, comments.TEAM_ISSUE_P2);
1056710586
await helpers.removeNeedsTriageLabelIfOlder(issue);
1056810587
} else if (label.name === 'p3:minor') {

actions/label-actions/src/comments.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = {
2-
TEAM_ISSUE_P0: `This issue has been labelled as P0 which means it needs an immediate fix and release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
2+
TEAM_ISSUE_P0: `This issue has been labelled as P0, which means it needs an immediate fix and release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
33

4-
TEAM_ISSUE_P1: `This issue has been labelled as P1 which means a fix and release should be prioritized during working hours. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
4+
TEAM_ISSUE_P1: `This issue has been labelled as P1, which means a fix and release should be prioritized during working hours. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
55

6-
TEAM_ISSUE_P2: `This issue has been labelled as P2 which means a fix should be in the next scheduled release. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
6+
TEAM_ISSUE_P2: `This issue has been labelled as P2, which means a fix should be done after current project work. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
77

8-
TEAM_ISSUE_P3: `This issue has been labelled as P3 which means this is a low priority issue for the next cooldown phase, and may be moved to the OSS repo. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
8+
TEAM_ISSUE_P3: `This issue has been labelled as P3, which means this is a low priority issue and may be moved to the OSS repo. See https://www.notion.so/ghost/Bug-Prioritization-bc64d4e9ebd3468ca31c9f8ac15cba0b for more info.`,
99

1010
TEAM_ISSUE_OSS: `This issue has been labelled as \`oss\`, which means it is a rare or low priority issue suitable for our contributors to work on. The triager will move it to the correct repo soon.`,
1111

actions/label-actions/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async function main() {
254254
} else if (label.name === 'p1:priority') {
255255
await helpers.leaveComment(issue, comments.TEAM_ISSUE_P1);
256256
await helpers.removeNeedsTriageLabelIfOlder(issue);
257-
} else if (label.name === 'p2:major') {
257+
} else if (label.name === 'p2') {
258258
await helpers.leaveComment(issue, comments.TEAM_ISSUE_P2);
259259
await helpers.removeNeedsTriageLabelIfOlder(issue);
260260
} else if (label.name === 'p3:minor') {

0 commit comments

Comments
 (0)