n8n-nodes-github-copilot 3.15.0 → 3.16.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.
@@ -1,9 +1,9 @@
1
- import { ICredentialType, INodeProperties, ICredentialTestRequest } from 'n8n-workflow';
1
+ import { ICredentialType, INodeProperties, ICredentialTestRequest, IAuthenticateGeneric } from 'n8n-workflow';
2
2
  export declare class GitHubCopilotApi implements ICredentialType {
3
3
  name: string;
4
4
  displayName: string;
5
- extends: string[];
6
5
  documentationUrl: string;
7
6
  properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
8
  test: ICredentialTestRequest;
9
9
  }
@@ -4,75 +4,44 @@ exports.GitHubCopilotApi = void 0;
4
4
  class GitHubCopilotApi {
5
5
  constructor() {
6
6
  this.name = 'githubCopilotApi';
7
- this.displayName = 'GitHub Copilot API (OAuth)';
8
- this.extends = ['oAuth2Api'];
7
+ this.displayName = 'GitHub Copilot API (GitHub CLI Token)';
9
8
  this.documentationUrl = 'https://docs.github.com/en/copilot/github-copilot-chat/copilot-chat-in-ides/using-github-copilot-chat-in-your-ide';
10
9
  this.properties = [
11
10
  {
12
- displayName: 'Grant Type',
13
- name: 'grantType',
14
- type: 'hidden',
15
- default: 'authorizationCode',
16
- },
17
- {
18
- displayName: 'Client ID',
19
- name: 'clientId',
20
- type: 'string',
11
+ displayName: '⚠️ IMPORTANT: GitHub CLI Token Required',
12
+ name: 'notice',
13
+ type: 'notice',
21
14
  default: '',
22
- required: true,
23
- description: 'The Client ID of your GitHub OAuth App configured for GitHub Copilot API access',
24
- placeholder: 'e.g., Iv1.a1b2c3d4e5f6g7h8',
15
+ description: 'Only tokens generated by GitHub CLI work with Copilot API. OAuth2 and Personal Access Tokens from GitHub website DO NOT work.',
25
16
  },
26
17
  {
27
- displayName: 'Client Secret',
28
- name: 'clientSecret',
18
+ displayName: 'GitHub CLI Token',
19
+ name: 'token',
29
20
  type: 'string',
30
- typeOptions: { password: true },
21
+ typeOptions: {
22
+ password: true,
23
+ },
31
24
  default: '',
32
25
  required: true,
33
- description: 'The Client Secret of your GitHub OAuth App',
34
- placeholder: 'Your OAuth App Client Secret',
35
- },
36
- {
37
- displayName: 'Authorization URL',
38
- name: 'authUrl',
39
- type: 'hidden',
40
- default: 'https://github.com/login/oauth/authorize',
41
- },
42
- {
43
- displayName: 'Access Token URL',
44
- name: 'accessTokenUrl',
45
- type: 'hidden',
46
- default: 'https://github.com/login/oauth/access_token',
47
- },
48
- {
49
- displayName: 'Scope',
50
- name: 'scope',
51
- type: 'hidden',
52
- default: 'repo read:org gist',
53
- },
54
- {
55
- displayName: 'Auth URI Query Parameters',
56
- name: 'authQueryParameters',
57
- type: 'hidden',
58
- default: '',
59
- },
60
- {
61
- displayName: 'Authentication',
62
- name: 'authentication',
63
- type: 'hidden',
64
- default: 'header',
26
+ description: '⚠️ REQUIRED: Token generated by GitHub CLI that starts with "gho_". Get it by running: gh auth login && gh auth token. Other tokens will NOT work!',
27
+ placeholder: 'gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
65
28
  },
66
29
  ];
30
+ this.authenticate = {
31
+ type: 'generic',
32
+ properties: {
33
+ headers: {
34
+ 'Authorization': '=Bearer {{$credentials.token}}',
35
+ 'Accept': 'application/json',
36
+ 'Content-Type': 'application/json',
37
+ },
38
+ },
39
+ };
67
40
  this.test = {
68
41
  request: {
69
42
  baseURL: 'https://api.githubcopilot.com',
70
43
  url: '/models',
71
44
  method: 'GET',
72
- headers: {
73
- 'Accept': 'application/json',
74
- 'Content-Type': 'application/json',
75
- },
76
45
  },
77
46
  };
78
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.15.0",
3
+ "version": "3.16.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",