Skip to content

Hide obsolete Job summaries - #902

Merged
bigdaz merged 5 commits into
gradle:mainfrom
SimonMarquis:hide-obsolete-job-summaries
Jun 10, 2026
Merged

bigdaz merged 5 commits into
gradle:mainfrom
SimonMarquis:hide-obsolete-job-summaries

Conversation

@SimonMarquis

@SimonMarquis SimonMarquis commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor
  • Injects a <!-- gradle-job-summary: ${jobCorrelator} --> marker on each job summary
  • Lists 100 last comments: unfortunately there is no API to specifically filter for comments, and checking the last 100 comments (the limit) is usually enough and does not require iterating over pages
  • Mutate comments having this expected marker

I tried to add some tests, but I'm not familiar enough to setup a complete test suite with proper mocking of GitHub/Octokit with jest.

I could potentially extract the prComment creation to check for the marker presence, let me know.

Note: it seems like there is currently an issue on mutating comments as OUTDATED through graphql. Although it does not work as expected (flagging as OUTDATED) the comments are still minimized, which is what we want.

Implements #176

Comment thread sources/src/job-summary.ts Resolved
SimonMarquis and others added 5 commits June 10, 2026 08:02
Create `canAddPRComment` to detect modes that can lead to PR comments.
Extract a `jobMarker` to be re-used in `addPRComment` and `minimizeObsoletePRComments`
…rker test

- Replace the type-only @octokit/graphql-schema dependency (which pulls in
  graphql + graphql-tag at runtime) with a minimal inline response type
- Document the comment-minimizing behavior in docs/setup-gradle.md
- Export jobMarker and add unit tests covering the marker/correlator format

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bigdaz
bigdaz force-pushed the hide-obsolete-job-summaries branch from 5b70edd to b30195e Compare June 10, 2026 15:59
@bigdaz
bigdaz merged commit 318eed7 into gradle:main Jun 10, 2026
61 checks passed
@SimonMarquis
SimonMarquis deleted the hide-obsolete-job-summaries branch June 10, 2026 16:56
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.

2 participants