n8n-nodes-github-copilot 3.31.16 → 3.31.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.17",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
|
|
@@ -41,6 +41,10 @@ async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = fals
|
|
|
41
41
|
}
|
|
42
42
|
const headers = {
|
|
43
43
|
...GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.HEADERS.WITH_AUTH(token),
|
|
44
|
+
"User-Agent": "GitHub-Copilot/1.0 (n8n-node)",
|
|
45
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
46
|
+
"Editor-Version": "vscode/1.95.0",
|
|
47
|
+
"Editor-Plugin-Version": "copilot/1.0.0",
|
|
44
48
|
};
|
|
45
49
|
if (hasMedia) {
|
|
46
50
|
headers["Copilot-Vision-Request"] = "true";
|
|
@@ -57,8 +61,11 @@ async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = fals
|
|
|
57
61
|
try {
|
|
58
62
|
const response = await fetch(fullUrl, options);
|
|
59
63
|
if (response.status === 403 && RETRY_ON_403 && attempt < MAX_RETRIES) {
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
const delayMs = BASE_DELAY * Math.pow(2, attempt - 1);
|
|
65
|
+
const jitter = Math.random() * delayMs * 0.2;
|
|
66
|
+
const totalDelay = Math.floor(delayMs + jitter);
|
|
67
|
+
console.warn(`⚠️ GitHub Copilot API 403 error on attempt ${attempt}/${MAX_RETRIES}. Retrying in ${totalDelay}ms...`);
|
|
68
|
+
await new Promise(resolve => setTimeout(resolve, totalDelay));
|
|
62
69
|
continue;
|
|
63
70
|
}
|
|
64
71
|
if (!response.ok) {
|
|
@@ -82,8 +89,11 @@ async function makeGitHubCopilotRequest(context, endpoint, body, hasMedia = fals
|
|
|
82
89
|
catch (error) {
|
|
83
90
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
84
91
|
if (attempt < MAX_RETRIES) {
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
const delayMs = BASE_DELAY * Math.pow(2, attempt - 1);
|
|
93
|
+
const jitter = Math.random() * delayMs * 0.2;
|
|
94
|
+
const totalDelay = Math.floor(delayMs + jitter);
|
|
95
|
+
console.warn(`⚠️ GitHub Copilot API error on attempt ${attempt}/${MAX_RETRIES}: ${lastError.message}. Retrying in ${totalDelay}ms...`);
|
|
96
|
+
await new Promise(resolve => setTimeout(resolve, totalDelay));
|
|
87
97
|
continue;
|
|
88
98
|
}
|
|
89
99
|
throw lastError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.17",
|
|
4
4
|
"description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
|