From 9d84900f3238fab8cd84ce47d658d25dd008be2f Mon Sep 17 00:00:00 2001 From: Diogenes Fernandes Date: Tue, 13 Jan 2026 17:21:37 -0300 Subject: [PATCH] add cooldown to dependabot Signed-off-by: Diogenes Fernandes --- .github/dependabot.yml | 2 ++ dist/index.js | 13 ++++++++++++- dist/index1.js | 13 ++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index aff82a1..9eff642 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,8 @@ version: 2 updates: - package-ecosystem: "npm" + cooldown: + default-days: 7 directory: "/" schedule: interval: "weekly" diff --git a/dist/index.js b/dist/index.js index 9117685..f1b0bed 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1810,7 +1810,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) { @@ -2290,6 +2290,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); diff --git a/dist/index1.js b/dist/index1.js index 1d72fb6..8b06691 100755 --- a/dist/index1.js +++ b/dist/index1.js @@ -1472,7 +1472,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) { @@ -1952,6 +1952,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);