Adjust issue code to account for labels
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
72444e9fc9
commit
d46a97ffa5
@ -2,6 +2,7 @@ const express = require('express');
|
|||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
// Controller Imports
|
// Controller Imports
|
||||||
|
const issueCtr = require('../controllers/issue.controllers');
|
||||||
|
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
@ -9,6 +10,6 @@ const router = express.Router();
|
|||||||
router.get('/server/stats');
|
router.get('/server/stats');
|
||||||
router.get('/server/versions');
|
router.get('/server/versions');
|
||||||
|
|
||||||
router.post('issue');
|
router.post('/issue', issueCtr.post);
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
@ -4,9 +4,11 @@ const log = require('../utils/log.utils');
|
|||||||
|
|
||||||
async function processor(data) {
|
async function processor(data) {
|
||||||
log.out('issueService.processor: Issue received', 'info');
|
log.out('issueService.processor: Issue received', 'info');
|
||||||
|
console.log(data); // TEMPORARY MEASURE
|
||||||
let out = {};
|
let out = {};
|
||||||
out.title = data.subject.replace(/<[^>]+>|[\*\$]/g, '');
|
out.labels = data?.labels;
|
||||||
out.body = data.msg.replace(/<[^>]+>|[\*\$]/g, '');
|
out.title = data?.subject.replace(/<[^>]+>|[\*\$]/g, '');
|
||||||
|
out.body = data?.msg.replace(/<[^>]+>|[\*\$]/g, '');
|
||||||
return await sendToGitea(out);
|
return await sendToGitea(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user