mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2026-12-01 12:14:42 +01:00
add cooldown to dependabot
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
This commit is contained in:
1 parent
9e9a1c276b
commit
9d84900f32
3 files changed
+26
-2
No files matched your search
@@ -1,6 +1,8 @@
|
|||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
Vendored
+12
-1
@@ -1810,7 +1810,7 @@ class HttpClient {
|
|||||||
this._maxRetries = 1;
|
this._maxRetries = 1;
|
||||||
this._keepAlive = false;
|
this._keepAlive = false;
|
||||||
this._disposed = false;
|
this._disposed = false;
|
||||||
this.userAgent = userAgent;
|
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
|
||||||
this.handlers = handlers || [];
|
this.handlers = handlers || [];
|
||||||
this.requestOptions = requestOptions;
|
this.requestOptions = requestOptions;
|
||||||
if (requestOptions) {
|
if (requestOptions) {
|
||||||
@@ -2290,6 +2290,17 @@ class HttpClient {
|
|||||||
}
|
}
|
||||||
return proxyAgent;
|
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) {
|
_performExponentialBackoff(retryNumber) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
||||||
|
|||||||
Vendored
+12
-1
@@ -1472,7 +1472,7 @@ class HttpClient {
|
|||||||
this._maxRetries = 1;
|
this._maxRetries = 1;
|
||||||
this._keepAlive = false;
|
this._keepAlive = false;
|
||||||
this._disposed = false;
|
this._disposed = false;
|
||||||
this.userAgent = userAgent;
|
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
|
||||||
this.handlers = handlers || [];
|
this.handlers = handlers || [];
|
||||||
this.requestOptions = requestOptions;
|
this.requestOptions = requestOptions;
|
||||||
if (requestOptions) {
|
if (requestOptions) {
|
||||||
@@ -1952,6 +1952,17 @@ class HttpClient {
|
|||||||
}
|
}
|
||||||
return proxyAgent;
|
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) {
|
_performExponentialBackoff(retryNumber) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
||||||
|
|||||||
Reference in new issue
Block a user