From fd5b263d66be52d4102ec3eb680e6b46191cfc54 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 26 Apr 2026 19:41:39 +0300 Subject: [PATCH 1/2] feat(changelog): emit free review link when changes are found Mirrors the breaking action: when oasdiff changelog finds changes, emit a ::notice:: annotation and a $GITHUB_STEP_SUMMARY markdown link pointing at the free review page on oasdiff.com. Wording matches the breaking action ("Review & approve these API changes") because changelog surfaces all severities, and warn/err changes still gate the merge and need approval just like breaking ones. Co-Authored-By: Claude Opus 4.7 (1M context) --- changelog/entrypoint.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/changelog/entrypoint.sh b/changelog/entrypoint.sh index 91786fe..ea687dc 100755 --- a/changelog/entrypoint.sh +++ b/changelog/entrypoint.sh @@ -99,6 +99,17 @@ fi if [ -n "$output" ] && ! echo "$output" | head -n 1 | grep -q "^No "; then write_output "$output" + # Emit upgrade notice pointing to the free review page + urlencode() { printf '%s' "$1" | jq -sRr @uri; } + base_path=$(echo "$base" | sed 's/.*://') + rev_path=$(echo "$revision" | sed 's/.*://') + owner="${GITHUB_REPOSITORY%%/*}" + repo="${GITHUB_REPOSITORY#*/}" + head_sha=$(jq -r '.pull_request.head.sha // empty' "$GITHUB_EVENT_PATH" 2>/dev/null || echo "") + if [ -z "$head_sha" ]; then head_sha="$GITHUB_SHA"; fi + free_review_url="https://www.oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=$(urlencode "$GITHUB_BASE_REF")&rev_sha=${head_sha}&base_file=$(urlencode "$base_path")&rev_file=$(urlencode "$rev_path")" + echo "::notice::📋 Review & approve these API changes → ${free_review_url}" + echo "### 📋 [Review & approve these API changes](${free_review_url})" >> "$GITHUB_STEP_SUMMARY" else write_output "No changelog changes" fi From ab7743b5304b3d7ba80e7d4b83ccb592dd962c16 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Sun, 26 Apr 2026 19:44:26 +0300 Subject: [PATCH 2/2] fix(changelog): install jq in Docker image The new review-link emission uses jq to read the PR head SHA from GITHUB_EVENT_PATH and to URL-encode path arguments. The breaking and pr-comment Dockerfiles already install it; mirror that here. Co-Authored-By: Claude Opus 4.7 (1M context) --- changelog/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog/Dockerfile b/changelog/Dockerfile index 9cb0910..3c878c2 100644 --- a/changelog/Dockerfile +++ b/changelog/Dockerfile @@ -1,4 +1,5 @@ FROM tufin/oasdiff:v1.15.0 +RUN apk add --no-cache jq ENV PLATFORM github-action COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]