Introduce scorecards

Signed-off-by: irma12 <irma@roadie.io>
This commit is contained in:
irma12
2021-11-17 14:28:54 +01:00
parent 33c7d6522a
commit dc62dcab12
25 changed files with 714 additions and 5 deletions
@@ -92,11 +92,6 @@ export async function createRouter<
router.post('/checks/run/:namespace/:kind/:name', async (req, res) => {
const { namespace, kind, name } = req.params;
try {
if (!('checks' in req.body)) {
return res.status(422).send({
message: 'Failed to get checks from request.',
});
}
const { checks }: { checks: string[] } = req.body;
const entityTriplet = stringifyEntityRef({ namespace, kind, name });
const checkResult = await factChecker.runChecks(entityTriplet, checks);