n8n-nodes-github-copilot 3.31.3 → 3.31.5
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.
|
@@ -84,6 +84,7 @@ class GitHubCopilotAuthHelper {
|
|
|
84
84
|
}
|
|
85
85
|
async webhook() {
|
|
86
86
|
const req = this.getRequestObject();
|
|
87
|
+
const res = this.getResponseObject();
|
|
87
88
|
const clientId = this.getNodeParameter("clientId");
|
|
88
89
|
const scopes = this.getNodeParameter("scopes");
|
|
89
90
|
if (req.method === "POST") {
|
|
@@ -103,12 +104,10 @@ class GitHubCopilotAuthHelper {
|
|
|
103
104
|
}),
|
|
104
105
|
});
|
|
105
106
|
const data = await response.json();
|
|
107
|
+
res.setHeader("Content-Type", "application/json");
|
|
108
|
+
res.status(200).json(data);
|
|
106
109
|
return {
|
|
107
|
-
|
|
108
|
-
status: 200,
|
|
109
|
-
headers: { "Content-Type": "application/json" },
|
|
110
|
-
body: JSON.stringify(data),
|
|
111
|
-
},
|
|
110
|
+
noWebhookResponse: true,
|
|
112
111
|
};
|
|
113
112
|
}
|
|
114
113
|
if (action === "poll_token") {
|
|
@@ -126,34 +125,28 @@ class GitHubCopilotAuthHelper {
|
|
|
126
125
|
}),
|
|
127
126
|
});
|
|
128
127
|
const data = await response.json();
|
|
128
|
+
res.setHeader("Content-Type", "application/json");
|
|
129
|
+
res.status(200).json(data);
|
|
129
130
|
return {
|
|
130
|
-
|
|
131
|
-
status: 200,
|
|
132
|
-
headers: { "Content-Type": "application/json" },
|
|
133
|
-
body: JSON.stringify(data),
|
|
134
|
-
},
|
|
131
|
+
noWebhookResponse: true,
|
|
135
132
|
};
|
|
136
133
|
}
|
|
137
134
|
throw new Error(`Unknown action: ${action}`);
|
|
138
135
|
}
|
|
139
136
|
catch (error) {
|
|
137
|
+
res.setHeader("Content-Type", "application/json");
|
|
138
|
+
res.status(500).json({ error: error.message });
|
|
140
139
|
return {
|
|
141
|
-
|
|
142
|
-
status: 500,
|
|
143
|
-
headers: { "Content-Type": "application/json" },
|
|
144
|
-
body: JSON.stringify({ error: error.message }),
|
|
145
|
-
},
|
|
140
|
+
noWebhookResponse: true,
|
|
146
141
|
};
|
|
147
142
|
}
|
|
148
143
|
}
|
|
149
144
|
const webhookUrl = this.getNodeWebhookUrl("default");
|
|
150
145
|
const html = generateAuthPage(webhookUrl);
|
|
146
|
+
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
147
|
+
res.status(200).send(html);
|
|
151
148
|
return {
|
|
152
|
-
|
|
153
|
-
status: 200,
|
|
154
|
-
headers: { "Content-Type": "text/html; charset=utf-8" },
|
|
155
|
-
body: html,
|
|
156
|
-
},
|
|
149
|
+
noWebhookResponse: true,
|
|
157
150
|
};
|
|
158
151
|
}
|
|
159
152
|
}
|
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.5",
|
|
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.
|
|
3
|
+
"version": "3.31.5",
|
|
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",
|