Skip to content

Commit

Permalink
feat: coverage reporting is allowed to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Feb 27, 2024
1 parent 811d1fd commit 3bd8edf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ function isValidCoverage(coverage) {
@ValidatorConstraint({ name: 'isValidCoverage', async: false })
export class IsValidCoverage implements ValidatorConstraintInterface {
validate(coverage: unknown) {
if (Object.keys(coverage).length === 0) {
return false;
}
// if (Object.keys(coverage).length === 0) {
// return false;
// }
return Object.values(coverage).every((item) => {
return isValidCoverage(item);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ export class ConsumerCoverageService {
const normalCoverageData = await getSpecificCoverageData(
normalCoverage.relationID,
);
if (Object.keys(normalCoverageData).length === 0) {
return;
}
// 允许{}的数据,后面可以作为每个覆盖率的触发器
// if (Object.keys(normalCoverageData).length === 0) {
// return;
// }

// 拉取变更代码
await this.pullChangeCode(normalCoverage);
Expand Down

0 comments on commit 3bd8edf

Please sign in to comment.