From 25ea36cae1e1227255027c96e98c688cf9256e93 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Tue, 17 Mar 2026 22:30:44 +0200 Subject: [PATCH 1/2] phase3: send base_file/rev_file in pr-comment payload; log review page URL The service uses base_file and rev_file to store the PRReport for the approval workflow. The response now includes report_url which is printed to the Action log for visibility. Co-Authored-By: Claude Sonnet 4.6 --- pr-comment/entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pr-comment/entrypoint.sh b/pr-comment/entrypoint.sh index 245d6bf..69f6526 100755 --- a/pr-comment/entrypoint.sh +++ b/pr-comment/entrypoint.sh @@ -63,8 +63,10 @@ payload=$(jq -n \ --argjson pr "$pr_number" \ --arg sha "$GITHUB_SHA" \ --arg base_ref "$GITHUB_BASE_REF" \ + --arg base_file "$base" \ + --arg rev_file "$revision" \ --argjson changes "$changes" \ - '{github: {token: $token, owner: $owner, repo: $repo, pull_number: $pr, head_sha: $sha, base_ref: $base_ref}, changes: $changes}') + '{github: {token: $token, owner: $owner, repo: $repo, pull_number: $pr, head_sha: $sha, base_ref: $base_ref}, base_file: $base_file, rev_file: $rev_file, changes: $changes}') # POST to oasdiff-service response=$(curl -s -w "\n%{http_code}" -X POST \ @@ -77,7 +79,11 @@ body=$(echo "$response" | sed '$d') if [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]; then comment_url=$(echo "$body" | jq -r '.comment_url // empty') + report_url=$(echo "$body" | jq -r '.report_url // empty') echo "PR comment posted: $comment_url" + if [ -n "$report_url" ]; then + echo "Review page: $report_url" + fi else echo "ERROR: oasdiff-service returned HTTP $http_code" >&2 echo "$body" >&2 From 643e41c4006084e31373428258f08c5da69b9239 Mon Sep 17 00:00:00 2001 From: Reuven Harrison Date: Wed, 18 Mar 2026 19:56:15 +0200 Subject: [PATCH 2/2] phase3: emit free review URL as GitHub Actions notice annotation Builds the free review URL from repo/commit/file params and emits it as a ::notice:: annotation so it appears in the Actions summary. Co-Authored-By: Claude Sonnet 4.6 --- pr-comment/entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pr-comment/entrypoint.sh b/pr-comment/entrypoint.sh index 69f6526..1f1a6c8 100755 --- a/pr-comment/entrypoint.sh +++ b/pr-comment/entrypoint.sh @@ -55,6 +55,11 @@ fi owner="${GITHUB_REPOSITORY%%/*}" repo="${GITHUB_REPOSITORY#*/}" +# Emit free review annotation (public repos only — no auth required) +urlencode() { printf '%s' "$1" | jq -sRr @uri; } +free_review_url="https://oasdiff.com/review?owner=${owner}&repo=${repo}&base_sha=${GITHUB_BASE_REF}&rev_sha=${GITHUB_SHA}&base_file=$(urlencode "$base")&rev_file=$(urlencode "$revision")" +echo "::notice::📋 View API changes → ${free_review_url}" + # Build the JSON payload payload=$(jq -n \ --arg token "$github_token" \