feat: comment to test run's case (#390)

This commit is contained in:
kimatata
2026-02-23 12:26:07 +09:00
committed by GitHub
parent 1f4ac0ae7b
commit a9674c81ab
27 changed files with 1045 additions and 40 deletions

View File

@@ -109,7 +109,19 @@ export default function (sequelize) {
},
{
model: RunCase,
attributes: ['id', 'runId', 'status'],
attributes: [
'id',
'runId',
'status',
[
sequelize.literal(
'(SELECT COUNT(*) FROM `comments` WHERE `comments`.`commentableType` = ' +
sequelize.escape('RunCase') +
' AND `comments`.`commentableId` = `RunCases`.`id`)'
),
'commentCount',
],
],
// Must be 'true' when filtering by status, otherwise all cases are returned.
required: runCaseRequired,
where: {