From 3c3a5e34cf008f85a0f21215822f98c9dea46ade Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 6 Jun 2026 11:16:11 +0300 Subject: [PATCH 1/2] Thin the free step summary to a link; add workflow param; drop the notice Move the volatile free-review content off the (frozen, version-pinned) action and onto the /review page we deploy. The breaking/changelog step summary is now a single link to the page, which renders the command, install help, and any upgrade nudge. Keeping that on the page means we can change it without shipping a new action version that users must upgrade to (the missing-fetch command this spring would have been a page-only fix). - Step summary: one retitled link ("View these ... changes in a side-by-side review"), no baked command, no "approve" framing (free can't approve in place). - Drop the duplicate ::notice:: review link: it isn't clickable in GitHub annotations and only repeated the summary; per-change ::error:: annotations remain the inline CI signal. - Add a `workflow` param from GITHUB_WORKFLOW_REF (the exact .github/workflows file path), so the page can deep-link the file to bump the action pin. Older links without it fall back to the workflows folder on the page side. Co-Authored-By: Claude Opus 4.8 (1M context) --- breaking/entrypoint.sh | 26 ++++++++++++-------------- changelog/entrypoint.sh | 23 +++++++++++------------ 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/breaking/entrypoint.sh b/breaking/entrypoint.sh index 4cef0b0..0d55e6b 100755 --- a/breaking/entrypoint.sh +++ b/breaking/entrypoint.sh @@ -152,22 +152,20 @@ if [ -n "$breaking_changes" ] && ! echo "$breaking_changes" | head -n 1 | grep - # commit where the file lives at a different path. base_sha=$(jq -r '.pull_request.base.sha // empty' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") if [ -z "$base_sha" ]; then base_sha=$(git rev-parse "origin/$GITHUB_BASE_REF" 2>/dev/null || echo "$GITHUB_BASE_REF"); fi + # GITHUB_WORKFLOW_REF is "//.github/workflows/@"; + # strip the repo prefix and the @ref suffix to get just the workflow file + # path, so the /review page can deep-link the exact file to bump the pin. + wf_path="${GITHUB_WORKFLOW_REF#"$GITHUB_REPOSITORY"/}" + wf_path="${wf_path%@*}" free_review_url="https://www.oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=$(urlencode "$base_sha")&rev_sha=${head_sha}&base_file=$(urlencode "$base_path")&rev_file=$(urlencode "$rev_path")&action_version=$(urlencode "${GITHUB_ACTION_REF:-unknown}")" - echo "::notice::📋 Review & approve these breaking changes → ${free_review_url}" - # The Step Summary surfaces both the link (for visitors who'd rather use - # the web UI) and the CLI command itself (for visitors who recognize it - # and want to skip the instruction-page detour). GitHub renders the - # fenced code block with a built-in copy button, so the one-step path - # for the familiar-visitor cohort is: scroll to the Checks tab, click - # copy on the command, paste into a terminal in the local clone, run. + [ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")" + # Thin step summary: a single link to the /review page, which renders the + # command, install help, and any upgrade nudge. Keeping that content on the + # page (server-controlled) rather than baking it here means we can improve it + # without shipping a new action version that every user has to upgrade to. + # The per-change ::error:: annotations above remain the inline CI signal. { - echo "### 📋 [Review & approve these breaking changes](${free_review_url})" - echo "" - echo "Or run locally in your clone of \`${repo}\`:" - echo "" - echo '```bash' - echo "git fetch origin ${base_sha} ${head_sha} && oasdiff breaking ${base_sha}:${base_path} ${head_sha}:${rev_path} --open" - echo '```' + echo "### 📋 [View these breaking changes in a side-by-side review](${free_review_url})" } >> "$GITHUB_STEP_SUMMARY" else write_output "No breaking changes" diff --git a/changelog/entrypoint.sh b/changelog/entrypoint.sh index d2f1269..dc2726a 100755 --- a/changelog/entrypoint.sh +++ b/changelog/entrypoint.sh @@ -147,20 +147,19 @@ if [ -n "$output" ] && ! echo "$output" | head -n 1 | grep -q "^No "; then # commit where the file lives at a different path. base_sha=$(jq -r '.pull_request.base.sha // empty' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") if [ -z "$base_sha" ]; then base_sha=$(git rev-parse "origin/$GITHUB_BASE_REF" 2>/dev/null || echo "$GITHUB_BASE_REF"); fi + # GITHUB_WORKFLOW_REF is "//.github/workflows/@"; + # strip the repo prefix and the @ref suffix to get just the workflow file + # path, so the /review page can deep-link the exact file to bump the pin. + wf_path="${GITHUB_WORKFLOW_REF#"$GITHUB_REPOSITORY"/}" + wf_path="${wf_path%@*}" free_review_url="https://www.oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=$(urlencode "$base_sha")&rev_sha=${head_sha}&base_file=$(urlencode "$base_path")&rev_file=$(urlencode "$rev_path")&action_version=$(urlencode "${GITHUB_ACTION_REF:-unknown}")" - echo "::notice::📋 Review & approve these API changes → ${free_review_url}" - # The Step Summary surfaces both the link (for visitors who'd rather use - # the web UI) and the CLI command itself (for visitors who recognize it - # and want to skip the instruction-page detour). GitHub renders the - # fenced code block with a built-in copy button. + [ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")" + # Thin step summary: a single link to the /review page, which renders the + # command, install help, and any upgrade nudge. Keeping that content on the + # page (server-controlled) rather than baking it here means we can improve it + # without shipping a new action version that every user has to upgrade to. { - echo "### 📋 [Review & approve these API changes](${free_review_url})" - echo "" - echo "Or run locally in your clone of \`${repo}\`:" - echo "" - echo '```bash' - echo "git fetch origin ${base_sha} ${head_sha} && oasdiff changelog ${base_sha}:${base_path} ${head_sha}:${rev_path} --open" - echo '```' + echo "### 📋 [View these API changes in a side-by-side review](${free_review_url})" } >> "$GITHUB_STEP_SUMMARY" else write_output "No changelog changes" From 949e7d1ecef93daf3828341846dfa53c14ab6206 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sat, 6 Jun 2026 11:19:31 +0300 Subject: [PATCH 2/2] Neutralize step-summary comments (drop internal strategy rationale from public entrypoints) --- breaking/entrypoint.sh | 10 +++------- changelog/entrypoint.sh | 9 +++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/breaking/entrypoint.sh b/breaking/entrypoint.sh index 0d55e6b..09ea97c 100755 --- a/breaking/entrypoint.sh +++ b/breaking/entrypoint.sh @@ -153,17 +153,13 @@ if [ -n "$breaking_changes" ] && ! echo "$breaking_changes" | head -n 1 | grep - base_sha=$(jq -r '.pull_request.base.sha // empty' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") if [ -z "$base_sha" ]; then base_sha=$(git rev-parse "origin/$GITHUB_BASE_REF" 2>/dev/null || echo "$GITHUB_BASE_REF"); fi # GITHUB_WORKFLOW_REF is "//.github/workflows/@"; - # strip the repo prefix and the @ref suffix to get just the workflow file - # path, so the /review page can deep-link the exact file to bump the pin. + # strip the repo prefix and the @ref suffix to get the workflow file path. wf_path="${GITHUB_WORKFLOW_REF#"$GITHUB_REPOSITORY"/}" wf_path="${wf_path%@*}" free_review_url="https://www.oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=$(urlencode "$base_sha")&rev_sha=${head_sha}&base_file=$(urlencode "$base_path")&rev_file=$(urlencode "$rev_path")&action_version=$(urlencode "${GITHUB_ACTION_REF:-unknown}")" [ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")" - # Thin step summary: a single link to the /review page, which renders the - # command, install help, and any upgrade nudge. Keeping that content on the - # page (server-controlled) rather than baking it here means we can improve it - # without shipping a new action version that every user has to upgrade to. - # The per-change ::error:: annotations above remain the inline CI signal. + # Step summary: a link to the /review page, which shows how to view these + # changes side by side. { echo "### 📋 [View these breaking changes in a side-by-side review](${free_review_url})" } >> "$GITHUB_STEP_SUMMARY" diff --git a/changelog/entrypoint.sh b/changelog/entrypoint.sh index dc2726a..ef7c765 100755 --- a/changelog/entrypoint.sh +++ b/changelog/entrypoint.sh @@ -148,16 +148,13 @@ if [ -n "$output" ] && ! echo "$output" | head -n 1 | grep -q "^No "; then base_sha=$(jq -r '.pull_request.base.sha // empty' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") if [ -z "$base_sha" ]; then base_sha=$(git rev-parse "origin/$GITHUB_BASE_REF" 2>/dev/null || echo "$GITHUB_BASE_REF"); fi # GITHUB_WORKFLOW_REF is "//.github/workflows/@"; - # strip the repo prefix and the @ref suffix to get just the workflow file - # path, so the /review page can deep-link the exact file to bump the pin. + # strip the repo prefix and the @ref suffix to get the workflow file path. wf_path="${GITHUB_WORKFLOW_REF#"$GITHUB_REPOSITORY"/}" wf_path="${wf_path%@*}" free_review_url="https://www.oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=$(urlencode "$base_sha")&rev_sha=${head_sha}&base_file=$(urlencode "$base_path")&rev_file=$(urlencode "$rev_path")&action_version=$(urlencode "${GITHUB_ACTION_REF:-unknown}")" [ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")" - # Thin step summary: a single link to the /review page, which renders the - # command, install help, and any upgrade nudge. Keeping that content on the - # page (server-controlled) rather than baking it here means we can improve it - # without shipping a new action version that every user has to upgrade to. + # Step summary: a link to the /review page, which shows how to view these + # changes side by side. { echo "### 📋 [View these API changes in a side-by-side review](${free_review_url})" } >> "$GITHUB_STEP_SUMMARY"