Skip to content

Commit bd87096

Browse files
chore(deps): bump @actions/core from 2.0.1 to 2.0.2 in /.github/actions/core (#36)
* chore(deps): bump @actions/core in /.github/actions/core Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 2.0.1 to 2.0.2. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-version: 2.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: build core action dist (auto) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8750076 commit bd87096

3 files changed

Lines changed: 21 additions & 10 deletions

File tree

.github/actions/core/dist/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2931,7 +2931,7 @@ class HttpClient {
29312931
this._maxRetries = 1;
29322932
this._keepAlive = false;
29332933
this._disposed = false;
2934-
this.userAgent = userAgent;
2934+
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
29352935
this.handlers = handlers || [];
29362936
this.requestOptions = requestOptions;
29372937
if (requestOptions) {
@@ -3411,6 +3411,17 @@ class HttpClient {
34113411
}
34123412
return proxyAgent;
34133413
}
3414+
_getUserAgentWithOrchestrationId(userAgent) {
3415+
const baseUserAgent = userAgent || 'actions/http-client';
3416+
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
3417+
if (orchId) {
3418+
// Sanitize the orchestration ID to ensure it contains only valid characters
3419+
// Valid characters: 0-9, a-z, _, -, .
3420+
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
3421+
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
3422+
}
3423+
return baseUserAgent;
3424+
}
34143425
_performExponentialBackoff(retryNumber) {
34153426
return __awaiter(this, void 0, void 0, function* () {
34163427
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);

.github/actions/core/package-lock.json

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

.github/actions/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"prepare": "cd ../../ && husky"
1010
},
1111
"dependencies": {
12-
"@actions/core": "^2.0.1",
12+
"@actions/core": "^2.0.2",
1313
"@actions/exec": "^2.0.0",
1414
"actions-toolkit": "^6.0.1",
1515
"mentions-regex": "^2.0.3",

0 commit comments

Comments
 (0)