n8n-nodes-github-copilot 3.31.8 → 3.31.9

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.
@@ -66,17 +66,6 @@ class GitHubCopilot {
66
66
  displayOptions: {
67
67
  show: {
68
68
  useCredential: [true],
69
- credentialType: ["githubCopilotApi"],
70
- },
71
- },
72
- },
73
- {
74
- name: "githubCopilotOAuth2Api",
75
- required: false,
76
- displayOptions: {
77
- show: {
78
- useCredential: [true],
79
- credentialType: ["githubCopilotOAuth2Api"],
80
69
  },
81
70
  },
82
71
  },
@@ -89,30 +78,6 @@ class GitHubCopilot {
89
78
  default: false,
90
79
  description: "Use GitHub Copilot API credential instead of local GitHub CLI authentication",
91
80
  },
92
- {
93
- displayName: "Credential Type",
94
- name: "credentialType",
95
- type: "options",
96
- options: [
97
- {
98
- name: "GitHub Copilot API (Manual Token)",
99
- value: "githubCopilotApi",
100
- description: "Use manual GitHub CLI token",
101
- },
102
- {
103
- name: "GitHub Copilot OAuth2 (with Helper)",
104
- value: "githubCopilotOAuth2Api",
105
- description: "Use OAuth2 credential with helper script",
106
- },
107
- ],
108
- default: "githubCopilotApi",
109
- description: "Type of credential to use for GitHub Copilot authentication",
110
- displayOptions: {
111
- show: {
112
- useCredential: [true],
113
- },
114
- },
115
- },
116
81
  {
117
82
  displayName: "Operation",
118
83
  name: "operation",
@@ -285,7 +250,6 @@ class GitHubCopilot {
285
250
  };
286
251
  }
287
252
  async execute() {
288
- var _a;
289
253
  const items = this.getInputData();
290
254
  const returnData = [];
291
255
  for (let i = 0; i < items.length; i++) {
@@ -298,15 +262,11 @@ class GitHubCopilot {
298
262
  let authMethod = "Local CLI";
299
263
  if (useCredential) {
300
264
  try {
301
- const credentialType = this.getNodeParameter("credentialType", i, "githubCopilotApi");
302
- const credentials = await this.getCredentials(credentialType);
303
- const token = (credentials.accessToken ||
304
- credentials.access_token ||
305
- ((_a = credentials.oauthTokenData) === null || _a === void 0 ? void 0 : _a.access_token) ||
306
- credentials.token);
265
+ const credentials = await this.getCredentials("githubCopilotApi");
266
+ const token = credentials.token;
307
267
  if (token) {
308
268
  githubToken = token;
309
- authMethod = `GitHub Copilot ${credentialType === "githubCopilotOAuth2Api" ? "OAuth2" : "API"} Credential`;
269
+ authMethod = "GitHub Copilot API Credential";
310
270
  }
311
271
  }
312
272
  catch {
@@ -25,20 +25,6 @@ class GitHubCopilotChatAPI {
25
25
  {
26
26
  name: "githubCopilotApi",
27
27
  required: true,
28
- displayOptions: {
29
- show: {
30
- credentialType: ["githubCopilotApi"],
31
- },
32
- },
33
- },
34
- {
35
- name: "githubCopilotOAuth2Api",
36
- required: true,
37
- displayOptions: {
38
- show: {
39
- credentialType: ["githubCopilotOAuth2Api"],
40
- },
41
- },
42
28
  },
43
29
  ],
44
30
  properties: nodeProperties_1.nodeProperties,
@@ -37,42 +37,9 @@ class GitHubCopilotChatModel {
37
37
  {
38
38
  name: "githubCopilotApi",
39
39
  required: true,
40
- displayOptions: {
41
- show: {
42
- credentialType: ["githubCopilotApi"],
43
- },
44
- },
45
- },
46
- {
47
- name: "githubCopilotOAuth2Api",
48
- required: true,
49
- displayOptions: {
50
- show: {
51
- credentialType: ["githubCopilotOAuth2Api"],
52
- },
53
- },
54
40
  },
55
41
  ],
56
42
  properties: [
57
- {
58
- displayName: "Credential Type",
59
- name: "credentialType",
60
- type: "options",
61
- options: [
62
- {
63
- name: "GitHub Copilot API (Manual Token)",
64
- value: "githubCopilotApi",
65
- description: "Use manual GitHub CLI token",
66
- },
67
- {
68
- name: "GitHub Copilot OAuth2 (with Helper)",
69
- value: "githubCopilotOAuth2Api",
70
- description: "Use OAuth2 credential with helper script",
71
- },
72
- ],
73
- default: "githubCopilotApi",
74
- description: "Type of credential to use for GitHub Copilot authentication",
75
- },
76
43
  {
77
44
  displayName: "Model",
78
45
  name: "model",
@@ -157,19 +124,14 @@ class GitHubCopilotChatModel {
157
124
  };
158
125
  }
159
126
  async supplyData(itemIndex) {
160
- var _a;
161
127
  const model = this.getNodeParameter("model", itemIndex);
162
128
  const options = this.getNodeParameter("options", itemIndex, {});
163
129
  const modelInfo = GitHubCopilotModels_1.GitHubCopilotModelsManager.getModelByValue(model);
164
- const credentialType = this.getNodeParameter("credentialType", 0, "githubCopilotApi");
165
- const credentials = (await this.getCredentials(credentialType));
166
- const token = (credentials.accessToken ||
167
- credentials.access_token ||
168
- ((_a = credentials.oauthTokenData) === null || _a === void 0 ? void 0 : _a.access_token) ||
169
- credentials.token);
130
+ const credentials = (await this.getCredentials("githubCopilotApi"));
131
+ const token = credentials.token;
170
132
  if (!token) {
171
- console.error("❌ Available OAuth2 credential properties:", Object.keys(credentials));
172
- throw new Error("GitHub Copilot: No access token found in OAuth2 credentials. Available properties: " +
133
+ console.error("❌ Available credential properties:", Object.keys(credentials));
134
+ throw new Error("GitHub Copilot: No token found in credentials. Available properties: " +
173
135
  Object.keys(credentials).join(", "));
174
136
  }
175
137
  const tokenPrefix = token.substring(0, Math.min(4, token.indexOf("_") + 1)) || token.substring(0, 4);
@@ -21,20 +21,6 @@ class GitHubCopilotOpenAI {
21
21
  {
22
22
  name: "githubCopilotApi",
23
23
  required: true,
24
- displayOptions: {
25
- show: {
26
- credentialType: ["githubCopilotApi"],
27
- },
28
- },
29
- },
30
- {
31
- name: "githubCopilotOAuth2Api",
32
- required: true,
33
- displayOptions: {
34
- show: {
35
- credentialType: ["githubCopilotOAuth2Api"],
36
- },
37
- },
38
24
  },
39
25
  ],
40
26
  properties: nodeProperties_1.nodeProperties,
@@ -327,42 +327,9 @@ class GitHubCopilotTest {
327
327
  {
328
328
  name: "githubCopilotApi",
329
329
  required: true,
330
- displayOptions: {
331
- show: {
332
- credentialType: ["githubCopilotApi"],
333
- },
334
- },
335
- },
336
- {
337
- name: "githubCopilotOAuth2Api",
338
- required: true,
339
- displayOptions: {
340
- show: {
341
- credentialType: ["githubCopilotOAuth2Api"],
342
- },
343
- },
344
330
  },
345
331
  ],
346
332
  properties: [
347
- {
348
- displayName: "Credential Type",
349
- name: "credentialType",
350
- type: "options",
351
- options: [
352
- {
353
- name: "GitHub Copilot API (Manual Token)",
354
- value: "githubCopilotApi",
355
- description: "Use manual GitHub CLI token",
356
- },
357
- {
358
- name: "GitHub Copilot OAuth2 (with Helper)",
359
- value: "githubCopilotOAuth2Api",
360
- description: "Use OAuth2 credential with helper script",
361
- },
362
- ],
363
- default: "githubCopilotApi",
364
- description: "Type of credential to use for GitHub Copilot authentication",
365
- },
366
333
  {
367
334
  displayName: "Test Function",
368
335
  name: "testFunction",
@@ -432,7 +399,6 @@ class GitHubCopilotTest {
432
399
  };
433
400
  }
434
401
  async execute() {
435
- var _a;
436
402
  const items = this.getInputData();
437
403
  const returnData = [];
438
404
  for (let i = 0; i < items.length; i++) {
@@ -444,12 +410,8 @@ class GitHubCopilotTest {
444
410
  const testsPerModel = testFunction === "consolidatedTest"
445
411
  ? this.getNodeParameter("testsPerModel", i)
446
412
  : 5;
447
- const credentialType = this.getNodeParameter("credentialType", i, "githubCopilotApi");
448
- const credentials = await this.getCredentials(credentialType, i);
449
- const token = (credentials.accessToken ||
450
- credentials.access_token ||
451
- ((_a = credentials.oauthTokenData) === null || _a === void 0 ? void 0 : _a.access_token) ||
452
- credentials.token);
413
+ const credentials = await this.getCredentials("githubCopilotApi", i);
414
+ const token = credentials.token;
453
415
  if (!token) {
454
416
  throw new Error(GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ERRORS.CREDENTIALS_REQUIRED);
455
417
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.8",
3
+ "version": "3.31.9",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.8",
3
+ "version": "3.31.9",
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",