Skip to content

feat: added new "enabled" prop for project and patch status#23

Merged
MathurAditya724 merged 1 commit intomainfrom
patch-13
Feb 17, 2026
Merged

feat: added new "enabled" prop for project and patch status#23
MathurAditya724 merged 1 commit intomainfrom
patch-13

Conversation

@MathurAditya724
Copy link
Member

No description provided.

@MathurAditya724 MathurAditya724 merged commit dc1de75 into main Feb 17, 2026
6 checks passed
@MathurAditya724 MathurAditya724 deleted the patch-13 branch February 17, 2026 11:45
@github-actions
Copy link

Codecov Results 📊

172 passed | Total: 172 | Pass Rate: 100% | Execution Time: 264ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 742 uncovered lines.
❌ Project coverage is 55.7%. Comparing base (base) to head (head).

Files with missing lines (20)
File Patch % Lines
index.ts 0.00% ⚠️ 302 Missing
report-formatter.ts 44.27% ⚠️ 143 Missing and 10 partials
artifact-manager.ts 0.00% ⚠️ 150 Missing
github-client.ts 0.00% ⚠️ 46 Missing
comparison.ts 0.00% ⚠️ 34 Missing
file-finder.ts 0.00% ⚠️ 21 Missing
istanbul-parser.ts 95.88% ⚠️ 3 Missing and 14 partials
cobertura-parser.ts 94.25% ⚠️ 5 Missing and 10 partials
clover-parser.ts 95.65% ⚠️ 3 Missing and 11 partials
codecov-parser.ts 93.26% ⚠️ 5 Missing and 8 partials
jacoco-parser.ts 98.28% ⚠️ 1 Missing and 11 partials
parser-factory.ts 92.00% ⚠️ 6 Missing and 5 partials
go-parser.ts 94.20% ⚠️ 3 Missing and 5 partials
lcov-parser.ts 97.39% ⚠️ 1 Missing and 7 partials
coverage-comparison.ts 90.00% ⚠️ 5 Missing and 3 partials
config-loader.ts 94.23% ⚠️ 2 Missing and 5 partials
threshold-checker.ts 93.10% ⚠️ 2 Missing and 3 partials
status-check.ts 0.00% ⚠️ 5 Missing
base-parser.ts 72.73% ⚠️ 3 Missing and 1 partials
junit-parser.ts 95.45% ⚠️ 2 Missing and 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    55.76%    55.70%    -0.06%
==========================================
  Files           24        24         —
  Lines         1668      1670        +2
  Branches      1158      1166        +8
==========================================
+ Hits           928       928         —
- Misses         740       742        +2
- Partials        94        94         —

Generated by Codecov Action

Comment on lines +287 to +293
if (coverageConfig.status?.project.enabled !== false) {
await statusReporter.reportStatus(
"codecov/project",
projectStatus.status,
projectStatus.description,
);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The failure logic for project and patch status checks runs even when enabled: false, causing the build to fail if failOnError: true.
Severity: MEDIUM

Suggested Fix

Wrap the failure logic for both project and patch status checks inside the same conditional that checks the enabled flag, ensuring that if a check is disabled, it can neither report a status nor trigger a build failure.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/index.ts#L287-L293

Potential issue: The `enabled: false` setting for project and patch status checks only
prevents the status from being reported. It does not prevent the subsequent failure
logic from executing. If a disabled check's status is `"failure"` and `failOnError` is
`true`, the `coverageChecksFailed` flag is still set to `true`. This causes the build to
fail, which is contrary to the expectation that disabling a check would prevent it from
causing a build failure. The issue is present in the `if (projectStatus.status ===
'failure')` and `if (patchStatus.status === 'failure')` blocks, which are not guarded by
the `enabled` flag.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments