forked from MyZubster-Ecosystem/myzubster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-github-mock.js
More file actions
33 lines (28 loc) · 1.33 KB
/
Copy pathtest-github-mock.js
File metadata and controls
33 lines (28 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const axios = require('axios');
async function testGitHubMock() {
console.log('🧪 Testing GitHub Mock Integration...\n');
// Simula un nuovo issue
const mockIssue = {
number: 42,
title: "Fix: Monero payment gateway timeout",
body: "When users try to pay with Monero, the transaction times out after 30 seconds. Need to increase timeout and add better error handling.",
html_url: "https://github.com/MyZubster-Ecosystem/MyZubsterGateway/issues/42",
labels: [{ name: "bug" }, { name: "bounty" }, { name: "high-priority" }],
created_at: new Date().toISOString()
};
console.log('📝 Sending mock issue to AI Automation...');
try {
// Invia l'issue al sistema
const response = await axios.post('http://localhost:5678/api/github/issue', mockIssue);
console.log('✅ Issue sent successfully');
console.log('📊 Analysis:', JSON.stringify(response.data, null, 2));
} catch (error) {
if (error.response && error.response.status === 404) {
console.log('ℹ️ API endpoint not yet implemented, but system is ready');
console.log('💡 The system will analyze this issue when GitHub is configured');
} else {
console.error('❌ Test failed:', error.message);
}
}
}
testGitHubMock();