n8n-nodes-github-copilot 3.16.0 → 3.18.0
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.
|
@@ -65,12 +65,19 @@ class GitHubCopilot {
|
|
|
65
65
|
required: false,
|
|
66
66
|
displayOptions: {
|
|
67
67
|
show: {
|
|
68
|
-
|
|
68
|
+
useCredential: [true],
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
72
|
],
|
|
73
73
|
properties: [
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Authentication Method',
|
|
76
|
+
name: 'useCredential',
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
default: false,
|
|
79
|
+
description: 'Use GitHub Copilot API credential instead of local GitHub CLI authentication',
|
|
80
|
+
},
|
|
74
81
|
{
|
|
75
82
|
displayName: 'Operation',
|
|
76
83
|
name: 'operation',
|
|
@@ -110,15 +117,6 @@ class GitHubCopilot {
|
|
|
110
117
|
placeholder: 'Enter your request...',
|
|
111
118
|
description: 'What you want GitHub Copilot to help with',
|
|
112
119
|
},
|
|
113
|
-
{
|
|
114
|
-
displayName: 'GitHub Token (Optional)',
|
|
115
|
-
name: 'githubToken',
|
|
116
|
-
type: 'string',
|
|
117
|
-
typeOptions: { password: true },
|
|
118
|
-
default: '',
|
|
119
|
-
placeholder: 'gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
|
|
120
|
-
description: '⚠️ IMPORTANT: Only tokens generated by GitHub CLI itself work with Copilot. Personal Access Tokens from GitHub website DO NOT work. If not provided, will use local "gh auth login" authentication. To get a working token, use: gh auth token',
|
|
121
|
-
},
|
|
122
120
|
{
|
|
123
121
|
displayName: 'Filter Output',
|
|
124
122
|
name: 'filterOutput',
|
|
@@ -194,9 +192,22 @@ class GitHubCopilot {
|
|
|
194
192
|
const operation = this.getNodeParameter('operation', i);
|
|
195
193
|
const prompt = this.getNodeParameter('prompt', i);
|
|
196
194
|
const context = this.getNodeParameter('context', i, '');
|
|
197
|
-
const
|
|
195
|
+
const useCredential = this.getNodeParameter('useCredential', i, false);
|
|
196
|
+
let githubToken = '';
|
|
197
|
+
let authMethod = 'Local CLI';
|
|
198
|
+
if (useCredential) {
|
|
199
|
+
try {
|
|
200
|
+
const credentials = await this.getCredentials('githubCopilotApi');
|
|
201
|
+
if (credentials && credentials.token) {
|
|
202
|
+
githubToken = credentials.token;
|
|
203
|
+
authMethod = 'GitHub Copilot Credential';
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'GitHub Copilot credential is not configured. Please configure it or use Local CLI authentication.');
|
|
208
|
+
}
|
|
209
|
+
}
|
|
198
210
|
const useToken = githubToken && githubToken.trim() !== '';
|
|
199
|
-
const authMethod = useToken ? 'Manual Token' : 'Local CLI';
|
|
200
211
|
let command;
|
|
201
212
|
let fullPrompt = prompt;
|
|
202
213
|
if (context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-github-copilot",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
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",
|