n8n-nodes-github-copilot 1.1.5 → 1.1.7

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.
@@ -246,6 +246,8 @@ class GitHubCopilot {
246
246
  if ((manualCredentials === null || manualCredentials === void 0 ? void 0 : manualCredentials.accessToken) && typeof manualCredentials.accessToken === 'string') {
247
247
  accessToken = manualCredentials.accessToken;
248
248
  credentialType = 'Manual Token';
249
+ const tokenPrefix = accessToken.substring(0, 4);
250
+ console.log('Using manual token with prefix:', tokenPrefix + '...');
249
251
  }
250
252
  else {
251
253
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Manual token credentials not found or invalid. Please configure Manual Token authentication or switch to OAuth2.');
@@ -323,17 +325,23 @@ class GitHubCopilot {
323
325
  stdout = err.stdout || '';
324
326
  }
325
327
  if (stderr) {
328
+ let debugTokenInfo = '';
329
+ if (authType !== 'manual') {
330
+ debugTokenInfo = authType === 'local'
331
+ ? ' [Local CLI - no token passed]'
332
+ : ` [Token used: ${accessToken || 'none'}]`;
333
+ }
326
334
  if (stderr.includes('internal server error') || stderr.includes('code: 400')) {
327
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot service is temporarily unavailable (HTTP 400). This is a GitHub server issue. Please try again in a few moments. Error: ${stderr}`);
335
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot service is temporarily unavailable (HTTP 400). This is a GitHub server issue. Please try again in a few moments.${debugTokenInfo} Error: ${stderr}`);
328
336
  }
329
337
  else if (stderr.includes('401') || stderr.includes('Unauthorized') || stderr.includes('Bad credentials')) {
330
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub authentication failed. Please check your token has Copilot permissions. Error: ${stderr}`);
338
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub authentication failed. Please check your token has Copilot permissions.${debugTokenInfo} Error: ${stderr}`);
331
339
  }
332
340
  else if (stderr.includes('403') || stderr.includes('Forbidden')) {
333
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot access denied. Please ensure your account has Copilot subscription. Error: ${stderr}`);
341
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot access denied. Please ensure your account has Copilot subscription.${debugTokenInfo} Error: ${stderr}`);
334
342
  }
335
343
  else if (!stdout) {
336
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot CLI error: ${stderr}`);
344
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `GitHub Copilot CLI error:${debugTokenInfo} ${stderr}`);
337
345
  }
338
346
  }
339
347
  const filterOutput = this.getNodeParameter('filterOutput', i, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "n8n community node for GitHub Copilot CLI integration",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",