Skip to content

Commit 5ffbc91

Browse files
Pass the PR base branch in the review URL so the page can deep-link the editable workflow (#147)
1 parent 1ea0499 commit 5ffbc91

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

breaking/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ if [ -n "$breaking_changes" ] && ! echo "$breaking_changes" | head -n 1 | grep -
158158
wf_path="${wf_path%@*}"
159159
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}")"
160160
[ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")"
161+
# The PR base branch is where the workflow file lives; pass it so the page
162+
# can deep-link the editable file (/edit/<branch>/<path>).
163+
[ -n "$GITHUB_BASE_REF" ] && free_review_url="${free_review_url}&branch=$(urlencode "$GITHUB_BASE_REF")"
161164
# Step summary: a link to the /review page, which shows how to view these
162165
# changes side by side.
163166
{

changelog/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ if [ -n "$output" ] && ! echo "$output" | head -n 1 | grep -q "^No "; then
153153
wf_path="${wf_path%@*}"
154154
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}")"
155155
[ -n "$wf_path" ] && free_review_url="${free_review_url}&workflow=$(urlencode "$wf_path")"
156+
# The PR base branch is where the workflow file lives; pass it so the page
157+
# can deep-link the editable file (/edit/<branch>/<path>).
158+
[ -n "$GITHUB_BASE_REF" ] && free_review_url="${free_review_url}&branch=$(urlencode "$GITHUB_BASE_REF")"
156159
# Step summary: a link to the /review page, which shows how to view these
157160
# changes side by side.
158161
{

0 commit comments

Comments
 (0)