chore: align infrastructure with server
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
const { Buffer } = require('buffer');
|
||||
|
||||
async function testGitea() {
|
||||
const url = 'http://git.a-crm.controlsystem.kz';
|
||||
const token = '1b3d0d3b5391c67ead8f8dc7380fb7f07434fc64';
|
||||
const owner = 'almalexyz'; // Adjust if needed
|
||||
const repo = 'MM';
|
||||
|
||||
console.log(`Testing Gitea API at ${url}...`);
|
||||
|
||||
try {
|
||||
const res = await fetch(`${url}/api/v1/repos/AVTEX/MMAVTEX`, {
|
||||
headers: { 'Authorization': `token ${token}` }
|
||||
});
|
||||
console.log('Repo check status:', res.status);
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
console.log('Repo Name:', data.name);
|
||||
} else {
|
||||
const err = await res.text();
|
||||
console.error('Repo check failed:', err);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Fetch error:', e);
|
||||
}
|
||||
}
|
||||
|
||||
testGitea();
|
||||
Reference in New Issue
Block a user