From 89cf1cc4b1bf0b2f88d788e6ff915fcaa9ff7633 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 14 Sep 2026 11:08:11 -0300 Subject: [PATCH 1/4] fix: Write the job summary of a release task from a single step - GitHub renders the summary of each step as a Markdown document of its own and joins them with a blank line, so the reviewers, written by a later step than the rest, ended up as a list of their own rather than as the last item of the one above them. - The summary is therefore written last, by a step that does nothing else, out of the outputs of the steps that produced the values. The step that requests the reviews now records the users in outputs instead of writing them to the summary itself. - The step runs unless the run was cancelled, rather than only on success, so that a failure after the pull request was opened still leaves its URL in the summary. Co-Authored-By: Claude Opus 5 --- .../task-release-and-deploy-to-prod.yaml | 69 +++++++++++-------- .../workflows/task-release-and-publish.yaml | 46 ++++++++----- 2 files changed, 71 insertions(+), 44 deletions(-) diff --git a/.github/workflows/task-release-and-deploy-to-prod.yaml b/.github/workflows/task-release-and-deploy-to-prod.yaml index 835fa7e..c6eb479 100644 --- a/.github/workflows/task-release-and-deploy-to-prod.yaml +++ b/.github/workflows/task-release-and-deploy-to-prod.yaml @@ -99,15 +99,6 @@ jobs: else echo 'There is nothing to release. The remaining steps will be skipped.' echo 'has_changes=false' >> "$GITHUB_OUTPUT" - - { - echo '# Release and Deploy to Production' - echo - echo 'Nothing to release.' - echo - echo "- **From:** \`$RELEASE_VCS_REF\`" - echo "- **Into:** \`$PRODUCTION_VCS_REF\`" - } >> "$GITHUB_STEP_SUMMARY" fi - name: Prepare Release @@ -158,19 +149,8 @@ jobs: )" echo "url=${github_pull_request_url:?}" >> "$GITHUB_OUTPUT" - - { - echo '# Release and Deploy to Production' - echo - echo "$github_pull_request_url" - echo - echo "- **Changes:** $CHANGE_COUNT" - echo "- **From:** \`$RELEASE_VCS_REF\`" - echo "- **Into:** \`$PRODUCTION_VCS_REF\`" - } >> "$GITHUB_STEP_SUMMARY" env: GH_TOKEN: ${{ github.token }} - CHANGE_COUNT: ${{ steps.check_changes.outputs.change_count }} RELEASE_ASSIGNEE: ${{ github.actor }} CHANGELOG_FILE_PATH: ${{ steps.generate_changelog.outputs.changelog_file_path }} GITHUB_PULL_REQUEST_LABELS: ${{ inputs.github_pull_request_labels }} @@ -208,6 +188,7 @@ jobs: POST_DEPLOYMENT_CHECKLIST_ITEMS: ${{ inputs.post_deployment_checklist_items }} - name: Request Reviews from Change Authors + id: request_reviews if: >- ${{ steps.check_changes.outputs.has_changes == 'true' && inputs.request_reviews_from_change_authors }} @@ -253,16 +234,50 @@ jobs: done { - if [ "${#requested_reviewers[@]}" -gt 0 ]; then - echo "- **Reviewers:** ${requested_reviewers[*]}" + echo "requested_reviewers=${requested_reviewers[*]}" + echo "rejected_reviewers=${rejected_reviewers[*]}" + } >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} + GITHUB_PULL_REQUEST_URL: ${{ steps.create_github_pull_request.outputs.url }} + + # No other step may write to $GITHUB_STEP_SUMMARY: GitHub renders each step's summary as a + # Markdown document of its own and joins them with a blank line, which splits the list below. + - name: Write Job Summary + if: ${{ !cancelled() && steps.check_changes.outcome == 'success' }} + run: | + { + echo '# Release and Deploy to Production' + echo + + if [ "$HAS_CHANGES" != 'true' ]; then + echo 'Nothing to release.' + echo + echo "- **From:** \`$RELEASE_VCS_REF\`" + echo "- **Into:** \`$PRODUCTION_VCS_REF\`" else - echo '- **Reviewers:** nobody' - fi + if [ -n "$GITHUB_PULL_REQUEST_URL" ]; then + echo "$GITHUB_PULL_REQUEST_URL" + echo + fi + + echo "- **Changes:** $CHANGE_COUNT" + echo "- **From:** \`$RELEASE_VCS_REF\`" + echo "- **Into:** \`$PRODUCTION_VCS_REF\`" + + if [ "$REQUEST_REVIEWS_FROM_CHANGE_AUTHORS" = 'true' ]; then + echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-nobody}" + fi - if [ "${#rejected_reviewers[@]}" -gt 0 ]; then - echo "- **Reviewers GitHub rejected:** ${rejected_reviewers[*]}" + if [ -n "$REJECTED_REVIEWERS" ]; then + echo "- **Reviewers GitHub rejected:** $REJECTED_REVIEWERS" + fi fi } >> "$GITHUB_STEP_SUMMARY" env: - GH_TOKEN: ${{ github.token }} + HAS_CHANGES: ${{ steps.check_changes.outputs.has_changes }} + CHANGE_COUNT: ${{ steps.check_changes.outputs.change_count }} GITHUB_PULL_REQUEST_URL: ${{ steps.create_github_pull_request.outputs.url }} + REQUEST_REVIEWS_FROM_CHANGE_AUTHORS: ${{ inputs.request_reviews_from_change_authors }} + REQUESTED_REVIEWERS: ${{ steps.request_reviews.outputs.requested_reviewers }} + REJECTED_REVIEWERS: ${{ steps.request_reviews.outputs.rejected_reviewers }} diff --git a/.github/workflows/task-release-and-publish.yaml b/.github/workflows/task-release-and-publish.yaml index d000a8b..6b62735 100644 --- a/.github/workflows/task-release-and-publish.yaml +++ b/.github/workflows/task-release-and-publish.yaml @@ -100,21 +100,12 @@ jobs: )" echo "url=${github_pull_request_url:?}" >> "$GITHUB_OUTPUT" - - { - echo '# Release and Publish' - echo - echo "$github_pull_request_url" - echo - echo "- **From:** \`$CREATE_RELEASE_VCS_REF\`" - echo "- **Into:** \`$RELEASE_VCS_REF\`" - echo "- **Release:** $PREPARE_RELEASE_GITHUB_PULL_REQUEST_HTML_URL" - } >> "$GITHUB_STEP_SUMMARY" env: GH_TOKEN: ${{ github.token }} GITHUB_PULL_REQUEST_LABELS: ${{ inputs.github_pull_request_labels }} - name: Request Reviews from Change Authors + id: request_reviews if: ${{ inputs.request_reviews_from_change_authors }} run: | github_pull_request_number="$( @@ -158,16 +149,37 @@ jobs: done { - if [ "${#requested_reviewers[@]}" -gt 0 ]; then - echo "- **Reviewers:** ${requested_reviewers[*]}" - else - echo '- **Reviewers:** nobody' + echo "requested_reviewers=${requested_reviewers[*]}" + echo "rejected_reviewers=${rejected_reviewers[*]}" + } >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} + GITHUB_PULL_REQUEST_URL: ${{ steps.create_github_pull_request.outputs.url }} + + # No other step may write to $GITHUB_STEP_SUMMARY: GitHub renders each step's summary as a + # Markdown document of its own and joins them with a blank line, which splits the list below. + - name: Write Job Summary + if: ${{ !cancelled() && steps.create_github_pull_request.outcome == 'success' }} + run: | + { + echo '# Release and Publish' + echo + echo "$GITHUB_PULL_REQUEST_URL" + echo + echo "- **From:** \`$CREATE_RELEASE_VCS_REF\`" + echo "- **Into:** \`$RELEASE_VCS_REF\`" + echo "- **Release:** $PREPARE_RELEASE_GITHUB_PULL_REQUEST_HTML_URL" + + if [ "$REQUEST_REVIEWS_FROM_CHANGE_AUTHORS" = 'true' ]; then + echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-nobody}" fi - if [ "${#rejected_reviewers[@]}" -gt 0 ]; then - echo "- **Reviewers GitHub rejected:** ${rejected_reviewers[*]}" + if [ -n "$REJECTED_REVIEWERS" ]; then + echo "- **Reviewers GitHub rejected:** $REJECTED_REVIEWERS" fi } >> "$GITHUB_STEP_SUMMARY" env: - GH_TOKEN: ${{ github.token }} GITHUB_PULL_REQUEST_URL: ${{ steps.create_github_pull_request.outputs.url }} + REQUEST_REVIEWS_FROM_CHANGE_AUTHORS: ${{ inputs.request_reviews_from_change_authors }} + REQUESTED_REVIEWERS: ${{ steps.request_reviews.outputs.requested_reviewers }} + REJECTED_REVIEWERS: ${{ steps.request_reviews.outputs.rejected_reviewers }} From e4651a040ea90a25e31186e702a2dbd231e2cda2 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 14 Sep 2026 11:12:08 -0300 Subject: [PATCH 2/4] fix: Keep the release checklist comment free of hard wrapping - GitHub renders every newline of a comment as a line break, so a hard-wrapped checklist item reaches the pull request broken across lines. The items this workflow contributes were already joined by a line continuation, but nothing said so to the callers that supply their own, and theirs arrive wrapped. The description of both inputs now states it. - The continuation of the common pre-deployment item was aligned under the text it continues, and that alignment survived the join as a run of seven spaces in the comment body. It now continues without indentation, as the tip above it already does. Co-Authored-By: Claude Opus 5 --- .github/workflows/task-release-and-deploy-to-prod.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/task-release-and-deploy-to-prod.yaml b/.github/workflows/task-release-and-deploy-to-prod.yaml index c6eb479..ce49d82 100644 --- a/.github/workflows/task-release-and-deploy-to-prod.yaml +++ b/.github/workflows/task-release-and-deploy-to-prod.yaml @@ -39,13 +39,15 @@ on: required: false description: >- Repository-specific items of the pre-deployment checklist, in Markdown. They are added - after the items that are common to every repository. + after the items that are common to every repository. An item must not be hard-wrapped, + because GitHub renders every newline of a comment as a line break. post_deployment_checklist_items: type: string required: false description: >- Repository-specific items of the post-deployment checklist, in Markdown. They are added - before the items that are common to every repository. + before the items that are common to every repository. An item must not be hard-wrapped, + because GitHub renders every newline of a comment as a line break. permissions: {} @@ -172,7 +174,7 @@ jobs: ## Pre-Deployment Checklist - [ ] Are there any **errors** 🚨 affecting the **staging** deployment environment \ - that would break the **production** environment 🔥? + that would break the **production** environment 🔥? ${PRE_DEPLOYMENT_CHECKLIST_ITEMS} ## Post-Deployment Checklist From 0260466443a404d0b38cec56095ac3d109a075db Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 14 Sep 2026 11:34:56 -0300 Subject: [PATCH 3/4] fix: Capitalize the reviewer placeholder of the job summary - The other values of the same list are sentences or identifiers that begin with a capital letter, and the placeholder standing in for an empty list of reviewers did not. Co-Authored-By: Claude Opus 5 --- .github/workflows/task-release-and-deploy-to-prod.yaml | 2 +- .github/workflows/task-release-and-publish.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/task-release-and-deploy-to-prod.yaml b/.github/workflows/task-release-and-deploy-to-prod.yaml index ce49d82..2fe6bd7 100644 --- a/.github/workflows/task-release-and-deploy-to-prod.yaml +++ b/.github/workflows/task-release-and-deploy-to-prod.yaml @@ -268,7 +268,7 @@ jobs: echo "- **Into:** \`$PRODUCTION_VCS_REF\`" if [ "$REQUEST_REVIEWS_FROM_CHANGE_AUTHORS" = 'true' ]; then - echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-nobody}" + echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-Nobody}" fi if [ -n "$REJECTED_REVIEWERS" ]; then diff --git a/.github/workflows/task-release-and-publish.yaml b/.github/workflows/task-release-and-publish.yaml index 6b62735..3707277 100644 --- a/.github/workflows/task-release-and-publish.yaml +++ b/.github/workflows/task-release-and-publish.yaml @@ -171,7 +171,7 @@ jobs: echo "- **Release:** $PREPARE_RELEASE_GITHUB_PULL_REQUEST_HTML_URL" if [ "$REQUEST_REVIEWS_FROM_CHANGE_AUTHORS" = 'true' ]; then - echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-nobody}" + echo "- **Reviewers:** ${REQUESTED_REVIEWERS:-Nobody}" fi if [ -n "$REJECTED_REVIEWERS" ]; then From 0ee8e207a141833afb74ced2a02f77f895695395 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 14 Sep 2026 11:42:40 -0300 Subject: [PATCH 4/4] chore(docs): Render the warning sign of the readme in color The readme opened its recommendation with a bare U+26A0 WARNING SIGN, which browsers and terminals drew as a monochrome outline instead of the yellow triangle it was meant to be. - U+26A0 has the Unicode property `Emoji_Presentation = No`, which makes it a text-default character: a renderer draws its plain text glyph unless it is asked for the emoji one. The glyph therefore came from the first font in the stack that covers the character, such as Segoe UI Symbol, DejaVu Sans or Noto Sans Symbols, and the color emoji font was never reached. - Appending U+FE0F VARIATION SELECTOR-16 requests emoji presentation for the character preceding it. That is what characters colored by default, such as U+1F6A7 CONSTRUCTION SIGN, already carry implicitly. - GitHub's `:warning:` shortcode produces a yellow triangle too, but only in GitHub Flavored Markdown. It stays literal text in every other renderer, and this file is read outside the web interface as well. Co-Authored-By: Claude Opus 5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07fd640..ae3b9d6 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ This repository contains reusable workflows, helpers, and utilities that are used internally within our organization. -⚠ We do **not** recommend taking a dependency on this repository. +⚠️ We do **not** recommend taking a dependency on this repository.