backend changes

This commit is contained in:
Chandini 2025-10-02 17:04:01 +05:30
parent 35a0ae1dac
commit d5d2508c58
2 changed files with 9 additions and 2 deletions

View File

@ -680,7 +680,7 @@ services:
- DIFF_STORAGE_PATH=/home/ubuntu/git/git-diff
- MAX_DIFF_SIZE_BYTES=10485760
volumes:
- /home/tech4biz/Desktop/Projectsnew/CODENUK1/git-repos:/home/ubuntu/git/git-repo
- /home/ubuntu/git/git-repo
networks:
- pipeline_network
depends_on:

View File

@ -328,7 +328,14 @@ router.post('/attach-repository', async (req, res) => {
];
const insertResult = await database.query(insertQuery, insertValues);
const repositoryRecord = insertResult.rows[0];
const repositoryRecord = insertResult.rows && insertResult.rows[0];
if (!repositoryRecord) {
return res.status(500).json({
success: false,
message: 'Failed to create repository record in database'
});
}
// Attempt to auto-create webhook on the attached repository using OAuth token (only for authenticated repos)
let webhookResult = null;