Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions breaking/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ if [ "$changes_exit" -eq 1 ]; then
# "couldn't upload" warning below.
echo "::notice::oasdiff: the side-by-side review isn't available in composed mode (-c). The breaking-change report above is unaffected."
else
# --open prints the review URL on stdout; in CI the browser-open
# step soft-fails. We grep the /review/e/ URL out by its stable path
# shape (not by surrounding prose). Tolerate a non-zero exit / no
# match so `set -e` doesn't abort the run. --template= overrides a
# 'template' set in .oasdiff.yaml, which would otherwise error this
# render (templates are rejected for the default text format) and
# yield no URL.
free_review_url=$(oasdiff breaking "$base" "$revision" $flags --open --template= 2>/dev/null \
# --open prints the review URL to stderr (oasdiff >= v1.19.1 moved it
# off stdout so it can't corrupt piped --format output); in CI the
# browser-open step soft-fails. Merge stderr into the pipe (2>&1) and
# grep the /review/e/ URL out by its stable path shape (not by
# surrounding prose). Tolerate a non-zero exit / no match so `set -e`
# doesn't abort the run. --template= overrides a 'template' set in
# .oasdiff.yaml, which would otherwise error this render (templates
# are rejected for the default text format) and yield no URL.
free_review_url=$(oasdiff breaking "$base" "$revision" $flags --open --template= 2>&1 \
| grep -oE 'https://[^[:space:]]+/review/e/[^[:space:]]+' | head -n 1) || true
if [ -n "$free_review_url" ]; then
echo "### 📋 [View these breaking changes in a side-by-side review](${free_review_url})" >> "$GITHUB_STEP_SUMMARY"
Expand Down
17 changes: 9 additions & 8 deletions changelog/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,15 @@ if [ "$changes_exit" -eq 1 ]; then
# "couldn't upload" warning below.
echo "::notice::oasdiff: the side-by-side review isn't available in composed mode (-c). The changelog above is unaffected."
else
# --open prints the review URL on stdout; in CI the browser-open
# step soft-fails. We grep the /review/e/ URL out by its stable path
# shape (not by surrounding prose). Tolerate a non-zero exit / no
# match so `set -e` doesn't abort the run. --template= overrides a
# 'template' set in .oasdiff.yaml, which would otherwise error this
# render (templates are rejected for the default text format) and
# yield no URL.
free_review_url=$(oasdiff changelog "$base" "$revision" $flags --open --template= 2>/dev/null \
# --open prints the review URL to stderr (oasdiff >= v1.19.1 moved it
# off stdout so it can't corrupt piped --format output); in CI the
# browser-open step soft-fails. Merge stderr into the pipe (2>&1) and
# grep the /review/e/ URL out by its stable path shape (not by
# surrounding prose). Tolerate a non-zero exit / no match so `set -e`
# doesn't abort the run. --template= overrides a 'template' set in
# .oasdiff.yaml, which would otherwise error this render (templates
# are rejected for the default text format) and yield no URL.
free_review_url=$(oasdiff changelog "$base" "$revision" $flags --open --template= 2>&1 \
| grep -oE 'https://[^[:space:]]+/review/e/[^[:space:]]+' | head -n 1) || true
if [ -n "$free_review_url" ]; then
echo "### 📋 [View these API changes in a side-by-side review](${free_review_url})" >> "$GITHUB_STEP_SUMMARY"
Expand Down
Loading