Demo: coverage report comment for the go-coverage-report README - #6
Merged
Merged
Conversation
Demo change to show the coverage report comment of fgrosse/go-coverage-report#110 in action.
Merging this branch changes the coverage (1 decrease, 1 increase)
Coverage detailsCompared to base commit 067c0f9 (run #36055790830)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
fgrosse
added a commit
to fgrosse/go-coverage-report
that referenced
this pull request
Sep 24, 2026
The screenshot shows the new layout of the details section including the baseline commit and run. It was taken from fgrosse/prioqueue#6.
fgrosse
added a commit
to fgrosse/go-coverage-report
that referenced
this pull request
Oct 1, 2026
The screenshot shows the new layout of the details section including the baseline commit and run. It was taken from fgrosse/prioqueue#6.
fgrosse
added a commit
to fgrosse/go-coverage-report
that referenced
this pull request
Oct 1, 2026
…he report (#110) * action: select the baseline by the PR base commit and explain it in the report Previously, the baseline coverage was always taken from the first result of "gh run list --limit=1" on the target branch. On busy repositories this API can return stale runs, so reports compared against old code or claimed the baseline artifact was unavailable even though a recent one existed. The baseline run is now selected as follows: 1. The run given via the new "baseline-run-id" input, if set. 2. The latest successful run for the new "baseline-sha" input, which defaults to the base commit of the pull request. 3. The latest successful run on the target branch, as before. The selected run is logged with its ID, commit and age. Warnings now distinguish between no baseline run being found and the artifact of the selected run not being downloadable. The pull request comment shows a single line caution callout at the top if the report does not compare against the base commit of the pull request. The new -baseline-commit, -baseline-run-id and -baseline-run-url flags name the baseline at the top of the details section, which is renamed to "Coverage details" and no longer uses headings. Fixes #109 * README: update screenshot of the coverage report comment The screenshot shows the new layout of the details section including the baseline commit and run. It was taken from fgrosse/prioqueue#6. * action: only pass -baseline-* flags to binaries that support them The action script now checks the usage of the installed binary before passing the new -baseline-* flags. This keeps it working with older binaries, e.g. when the "version" input is pinned to an older release or the action is used from main before the default version is bumped. Also label the baseline in the details section as "commit" instead of "base commit", since it is not the base commit of the pull request after a fallback or when using baseline-run-id. * report: update test from #111 for the new details layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demo pull request to show the new coverage report comment of fgrosse/go-coverage-report#110 for the README screenshot. Not meant to be merged.
It changes the coverage in two packages: the new
Clonemethods are untested (decrease inprioqueue) and new tests covertopk.Largest(increase intopk).