Skip to content

Commit fe21e7b

Browse files
Apply PR review feedback: fix dependency-review permissions and simplify coverage summary
Agent-Logs-Url: https://github.com/precise-alloy/regression-test/sessions/7825985b-3655-4410-8a6d-f9977b97fc67 Co-authored-by: tuyen-at-work <68000455+tuyen-at-work@users.noreply.github.com>
1 parent 6622ba5 commit fe21e7b

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
permissions:
3131
contents: read
32+
pull-requests: read
3233
steps:
3334
- name: Checkout code
3435
uses: actions/checkout@v5
@@ -89,28 +90,20 @@ jobs:
8990
9091
const summaryPath = 'coverage/coverage-summary.json';
9192
const summary = JSON.parse(fs.readFileSync(summaryPath, 'utf8')).total;
92-
const thresholds = {
93-
lines: 94,
94-
functions: 94,
95-
statements: 94,
96-
branches: 90,
97-
};
9893
const metrics = ['lines', 'functions', 'statements', 'branches'];
9994
const rows = metrics.map((metric) => {
10095
const value = summary[metric]?.pct ?? 0;
101-
const threshold = thresholds[metric];
102-
const status = value >= threshold ? 'PASS' : 'FAIL';
103-
return `| ${metric} | ${value.toFixed(2)}% | ${threshold}% | ${status} |`;
96+
return `| ${metric} | ${value.toFixed(2)}% |`;
10497
});
10598
10699
const markdown = [
107100
'## Coverage Summary',
108101
'',
109-
'| Metric | Coverage | Threshold | Status |',
110-
'| --- | ---: | ---: | :---: |',
102+
'| Metric | Coverage |',
103+
'| --- | ---: |',
111104
...rows,
112105
'',
113-
'Full HTML coverage report is attached as a workflow artifact.',
106+
'Coverage thresholds are enforced by the test runner configuration.',
114107
'',
115108
].join('\n');
116109

0 commit comments

Comments
 (0)