Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/actions/core/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@ class HttpClient {
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
Expand Down Expand Up @@ -3411,6 +3411,17 @@ class HttpClient {
}
return proxyAgent;
}
_getUserAgentWithOrchestrationId(userAgent) {
const baseUserAgent = userAgent || 'actions/http-client';
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
if (orchId) {
// Sanitize the orchestration ID to ensure it contains only valid characters
// Valid characters: 0-9, a-z, _, -, .
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
}
return baseUserAgent;
}
_performExponentialBackoff(retryNumber) {
return __awaiter(this, void 0, void 0, function* () {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
Expand Down
38 changes: 22 additions & 16 deletions .github/actions/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepare": "cd ../../ && husky"
},
"dependencies": {
"@actions/core": "^2.0.1",
"@actions/core": "^2.0.2",
"@actions/exec": "^2.0.0",
"actions-toolkit": "^6.0.1",
"mentions-regex": "^2.0.3",
Expand Down