Skip to content

Commit 5f513a1

Browse files
chore(deps): bump @actions/core from 2.0.1 to 2.0.2 (#569)
* chore(deps): bump @actions/core from 2.0.1 to 2.0.2 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] <[email protected]> * rebuild dist after dep bump Signed-off-by: Will Murphy <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Will Murphy <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Will Murphy <[email protected]>
1 parent 02ce04c commit 5f513a1

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

dist/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6678,7 +6678,7 @@ class HttpClient {
66786678
this._maxRetries = 1;
66796679
this._keepAlive = false;
66806680
this._disposed = false;
6681-
this.userAgent = userAgent;
6681+
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
66826682
this.handlers = handlers || [];
66836683
this.requestOptions = requestOptions;
66846684
if (requestOptions) {
@@ -7158,6 +7158,17 @@ class HttpClient {
71587158
}
71597159
return proxyAgent;
71607160
}
7161+
_getUserAgentWithOrchestrationId(userAgent) {
7162+
const baseUserAgent = userAgent || 'actions/http-client';
7163+
const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
7164+
if (orchId) {
7165+
// Sanitize the orchestration ID to ensure it contains only valid characters
7166+
// Valid characters: 0-9, a-z, _, -, .
7167+
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
7168+
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
7169+
}
7170+
return baseUserAgent;
7171+
}
71617172
_performExponentialBackoff(retryNumber) {
71627173
return __awaiter(this, void 0, void 0, function* () {
71637174
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"homepage": "https://github.com/anchore/anchore-scan-action#readme",
3737
"dependencies": {
3838
"@actions/cache": "^5.0.1",
39-
"@actions/core": "^2.0.1",
39+
"@actions/core": "^2.0.2",
4040
"@actions/exec": "^2.0.0",
4141
"@actions/tool-cache": "^2.0.2",
4242
"lodash": "^4.17.21"

0 commit comments

Comments
 (0)