Skip to content

Commit 8cc961a

Browse files
committed
CI: slim PR comments to unit-test results only
- VStar and plugin workflows: drop coverage rows and artifact details from issue comments; keep tests/passed/failures/errors. - SpotBugs and Checker Framework: remove PR issue comments (step summaries, artifacts, and gh-pages publishing unchanged). Made-with: Cursor
1 parent ef8e972 commit 8cc961a

File tree

4 files changed

+4
-135
lines changed

4 files changed

+4
-135
lines changed

.github/workflows/checkerframework.yml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
permissions:
1010
contents: write
11-
pull-requests: write
1211

1312
jobs:
1413
nullness:
@@ -66,59 +65,6 @@ jobs:
6665
Download the **checker-framework-report** artifact for the full report.
6766
EOF
6867
69-
- name: Comment on PR
70-
if: always() && github.event_name == 'pull_request' && steps.cf-warnings.outputs.found == 'true'
71-
uses: actions/github-script@v7
72-
with:
73-
script: |
74-
const total = '${{ steps.cf-warnings.outputs.total }}';
75-
const nullness = '${{ steps.cf-warnings.outputs.nullness }}';
76-
const init = '${{ steps.cf-warnings.outputs.init }}';
77-
78-
const body = [
79-
'## Checker Framework Nullness Analysis',
80-
'',
81-
'| Metric | Count |',
82-
'|--------|-------|',
83-
`| **Total warnings** | **${total}** |`,
84-
`| Nullness warnings | ${nullness} |`,
85-
`| Initialization warnings | ${init} |`,
86-
'',
87-
'<details>',
88-
'<summary>What does this mean?</summary>',
89-
'',
90-
'The Checker Framework Nullness Checker verifies that the code is free from',
91-
'null pointer dereferences. Warnings indicate places where a `@Nullable` value',
92-
'may flow into a `@NonNull` context. Download the **checker-framework-report**',
93-
'artifact for the full report.',
94-
'</details>',
95-
].join('\n');
96-
97-
const { data: comments } = await github.rest.issues.listComments({
98-
owner: context.repo.owner,
99-
repo: context.repo.repo,
100-
issue_number: context.issue.number,
101-
});
102-
const existing = comments.find(c =>
103-
c.user.type === 'Bot' && c.body.startsWith('## Checker Framework Nullness Analysis')
104-
);
105-
106-
if (existing) {
107-
await github.rest.issues.updateComment({
108-
owner: context.repo.owner,
109-
repo: context.repo.repo,
110-
comment_id: existing.id,
111-
body: body,
112-
});
113-
} else {
114-
await github.rest.issues.createComment({
115-
owner: context.repo.owner,
116-
repo: context.repo.repo,
117-
issue_number: context.issue.number,
118-
body: body,
119-
});
120-
}
121-
12268
- name: Upload report
12369
if: always()
12470
uses: actions/upload-artifact@v4

.github/workflows/plugin-UT.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,9 @@ jobs:
126126
const passed = '${{ steps.metrics.outputs.passed }}';
127127
const failures = '${{ steps.metrics.outputs.failures }}';
128128
const errors = '${{ steps.metrics.outputs.errors }}';
129-
const lineCov = '${{ steps.metrics.outputs.line_cov }}';
130-
const branchCov = '${{ steps.metrics.outputs.branch_cov }}';
131129
132130
const body = [
133-
'## Plugin Unit Tests & Coverage',
131+
'## Plugin Unit Tests',
134132
'',
135133
`**${status}** (Java 17)`,
136134
'',
@@ -140,15 +138,6 @@ jobs:
140138
`| Passed | ${passed} |`,
141139
`| Failures | ${failures} |`,
142140
`| Errors | ${errors} |`,
143-
`| Line Coverage | ${lineCov} |`,
144-
`| Branch Coverage | ${branchCov} |`,
145-
'',
146-
'<details>',
147-
'<summary>Coverage details</summary>',
148-
'',
149-
'Download the **plugin-coverage-report-java17** artifact for the full',
150-
'JaCoCo HTML report with per-class breakdowns.',
151-
'</details>',
152141
].join('\n');
153142
154143
const { data: comments } = await github.rest.issues.listComments({
@@ -157,7 +146,7 @@ jobs:
157146
issue_number: context.issue.number,
158147
});
159148
const existing = comments.find(c =>
160-
c.user.type === 'Bot' && c.body.startsWith('## Plugin Unit Tests & Coverage')
149+
c.user.type === 'Bot' && c.body.startsWith('## Plugin Unit Tests')
161150
);
162151
163152
if (existing) {

.github/workflows/spotbugs.yml

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
permissions:
1111
checks: write
1212
contents: write
13-
pull-requests: write
1413

1514
jobs:
1615
spotbugs:
@@ -68,60 +67,6 @@ jobs:
6867
| Low | ${{ steps.sb-counts.outputs.low }} |
6968
EOF
7069
71-
- name: Comment on PR
72-
if: always() && github.event_name == 'pull_request' && steps.sb-counts.outputs.found == 'true'
73-
uses: actions/github-script@v7
74-
with:
75-
script: |
76-
const total = '${{ steps.sb-counts.outputs.total }}';
77-
const high = '${{ steps.sb-counts.outputs.high }}';
78-
const medium = '${{ steps.sb-counts.outputs.medium }}';
79-
const low = '${{ steps.sb-counts.outputs.low }}';
80-
81-
const body = [
82-
'## SpotBugs Analysis',
83-
'',
84-
'| Priority | Count |',
85-
'|----------|-------|',
86-
`| **Total** | **${total}** |`,
87-
`| High | ${high} |`,
88-
`| Medium | ${medium} |`,
89-
`| Low | ${low} |`,
90-
'',
91-
'<details>',
92-
'<summary>What does this mean?</summary>',
93-
'',
94-
'SpotBugs performs static analysis on Java bytecode to find potential bugs.',
95-
'High-priority findings are most likely to be real defects. Download the',
96-
'**spotbugs-report** artifact for the detailed HTML report.',
97-
'</details>',
98-
].join('\n');
99-
100-
const { data: comments } = await github.rest.issues.listComments({
101-
owner: context.repo.owner,
102-
repo: context.repo.repo,
103-
issue_number: context.issue.number,
104-
});
105-
const existing = comments.find(c =>
106-
c.user.type === 'Bot' && c.body.startsWith('## SpotBugs Analysis')
107-
);
108-
109-
if (existing) {
110-
await github.rest.issues.updateComment({
111-
owner: context.repo.owner,
112-
repo: context.repo.repo,
113-
comment_id: existing.id,
114-
body: body,
115-
});
116-
} else {
117-
await github.rest.issues.createComment({
118-
owner: context.repo.owner,
119-
repo: context.repo.repo,
120-
issue_number: context.issue.number,
121-
body: body,
122-
});
123-
}
124-
12570
- name: Upload SpotBugs report
12671
if: always()
12772
uses: actions/upload-artifact@v4

.github/workflows/vstar-UT.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,9 @@ jobs:
123123
const passed = '${{ steps.metrics.outputs.passed }}';
124124
const failures = '${{ steps.metrics.outputs.failures }}';
125125
const errors = '${{ steps.metrics.outputs.errors }}';
126-
const lineCov = '${{ steps.metrics.outputs.line_cov }}';
127-
const branchCov = '${{ steps.metrics.outputs.branch_cov }}';
128126
129127
const body = [
130-
'## VStar Unit Tests & Coverage',
128+
'## VStar Unit Tests',
131129
'',
132130
`**${status}** (Java 17)`,
133131
'',
@@ -137,15 +135,6 @@ jobs:
137135
`| Passed | ${passed} |`,
138136
`| Failures | ${failures} |`,
139137
`| Errors | ${errors} |`,
140-
`| Line Coverage | ${lineCov} |`,
141-
`| Branch Coverage | ${branchCov} |`,
142-
'',
143-
'<details>',
144-
'<summary>Coverage details</summary>',
145-
'',
146-
'Download the **coverage-report-java17** artifact for the full',
147-
'JaCoCo HTML report with per-package and per-class breakdowns.',
148-
'</details>',
149138
].join('\n');
150139
151140
const { data: comments } = await github.rest.issues.listComments({
@@ -154,7 +143,7 @@ jobs:
154143
issue_number: context.issue.number,
155144
});
156145
const existing = comments.find(c =>
157-
c.user.type === 'Bot' && c.body.startsWith('## VStar Unit Tests & Coverage')
146+
c.user.type === 'Bot' && c.body.startsWith('## VStar Unit Tests')
158147
);
159148
160149
if (existing) {

0 commit comments

Comments
 (0)