feat(go-ci): add coverage-title input for sticky-comment heading#3
Merged
Conversation
Brings go-ci.yaml onto the same shape as csharp-ci (PR #1) and scala-ci (PR #2): a visible H2 heading is prepended to the rendered coverage markdown before the sticky-comment step picks it up, so a reader can tell the language at a glance when multiple coverage sticky comments coexist on the same PR. Default `coverage-title` is "Go coverage". The new "Prepend coverage title" step runs after the existing "Augment coverage report with cyclomatic complexity" step (which mutates `code-coverage-results.md` in place) so the H2 ends up at the top of the final file, and loud- fails if `code-coverage-results.md` is missing — mirroring the pattern landed in csharp-ci / scala-ci. terraform-ci.yaml is intentionally NOT changed: it has no coverage chain (no `irongut/CodeCoverageSummary` step, no `code-coverage-results.md`), only a separate `test-summary.md` sticky comment. Adding `coverage-title` there would mean fabricating a coverage chain, which is out of scope for this PR. PR #1 (csharp-ci) and PR #2 (scala-ci) are still open. README updates documenting `coverage-title` will follow once those land, to avoid three-way conflicts on README.md.
peaceful-bot
approved these changes
May 27, 2026
7 tasks
monsieurleberre
added a commit
that referenced
this pull request
May 27, 2026
Brings terraform-ci.yaml onto the same shape as csharp-ci (PR #1), scala-ci (PR #2), and go-ci (PR #3): a visible H2 heading is prepended to the rendered test-summary markdown before the sticky-comment step picks it up, so a reader can tell which workspace each sticky comment covers at a glance when multiple sticky comments coexist on the same PR. The input name, env-var name, step name, and description wording mirror csharp-ci / scala-ci / go-ci verbatim — coverage-title / COVERAGE_TITLE / "Prepend coverage title" — for cross-workflow consistency. The default is 'Terraform coverage'. The new "Prepend coverage title" step runs immediately after "Build test summary", gates on the same condition the surrounding test-summary chain uses (always() && steps.tests.outputs.ran == 'true'), and loud-fails (::error:: + exit 1) if test-summary.md is missing — mirroring the pattern landed in csharp-ci / scala-ci / go-ci. coverage-title flows into the shell via env: indirection, not direct ${{ }} interpolation in run:.
monsieurleberre
added a commit
that referenced
this pull request
May 27, 2026
…ng (#4) Brings terraform-ci.yaml onto the same shape as csharp-ci (PR #1), scala-ci (PR #2), and go-ci (PR #3): a visible H2 heading is prepended to the rendered test-summary markdown before the sticky-comment step picks it up, so a reader can tell which workspace each sticky comment covers at a glance when multiple sticky comments coexist on the same PR. The input name, env-var name, step name, and description wording mirror csharp-ci / scala-ci / go-ci verbatim — coverage-title / COVERAGE_TITLE / "Prepend coverage title" — for cross-workflow consistency. The default is 'Terraform coverage'. The new "Prepend coverage title" step runs immediately after "Build test summary", gates on the same condition the surrounding test-summary chain uses (always() && steps.tests.outputs.ran == 'true'), and loud-fails (::error:: + exit 1) if test-summary.md is missing — mirroring the pattern landed in csharp-ci / scala-ci / go-ci. coverage-title flows into the shell via env: indirection, not direct ${{ }} interpolation in run:.
monsieurleberre
added a commit
that referenced
this pull request
May 27, 2026
Promote four merged feature PRs into a tagged 1.1.0 section: - #2 scala-ci.yaml — new reusable sbt/Scala workflow - #1 csharp-ci.yaml — migrated to xUnit v3 + Microsoft.Testing.Platform - #3 go-ci.yaml — new coverage-title input - #4 terraform-ci.yaml — new coverage-title input Tagging (v1.1.0 + floating v1) follows on the merge commit per CONTRIBUTING.md.
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.
Summary
coverage-titleinput (string, defaultGo coverage) togo-ci.yamland a "Prepend coverage title" step that injects a visible H2 heading ontocode-coverage-results.mdbefore the existingmarocchino/sticky-pull-request-commentstep picks it up — so a reader can tell the language at a glance when multiple coverage sticky comments coexist on the same PR. Step is gated bysteps.discover.outputs.found == 'true'(same gate the surrounding coverage steps use) and loud-fails (echo "::error::…"; exit 1) ifcode-coverage-results.mdis missing.terraform-ci.yamlintentionally NOT changed — it has no coverage chain (noirongut/CodeCoverageSummarystep, nocode-coverage-results.md); only a separatetest-summary.mdsticky comment. Per scope, this PR does not fabricate a coverage chain there. terraform-ci can get its owntest-summary-titlelater if desired, but that's a different shape and a different PR.Test plan
actionlint v1.7.7runs clean on.github/workflows/go-ci.yaml(verified locally).go-ci.yaml, confirm the sticky coverage comment is prefixed by## Go coverage(or a caller-overridden title) and that the existinggo-coveragededup header still de-duplicates correctly.coverage-title:from the caller produces the override at the top of the comment.Related
Both are still open as of this PR's creation; README documentation for
coverage-titlewill follow once those land, to avoid three-way conflicts on README.md.