Skip to content

Commit

Permalink
release-note.sh fixes (#5068)
Browse files Browse the repository at this point in the history
Add a gh.exe search path that works with cygwin installations.

Do not bail out from the breaking changes loop when a change is
found without PR#. Instead, continue to the next one. This fixes
an issue where [BREAKING] changes appear in the detailed change
list by not in the summary of breaking changes.
  • Loading branch information
cheneym2 authored Sep 17, 2024
1 parent d866c0b commit 25d1559
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/scripts/release-note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ verbose=true
$verbose && echo "Reminder: PLEASE make sure your local repo is up-to-date before running the script." >&2

gh=""
for candidate in "$(which gh.exe)" "/mnt/c/Program Files/GitHub CLI/gh.exe" "/c/Program Files/GitHub CLI/gh.exe"
for candidate in "$(which gh.exe)" "/mnt/c/Program Files/GitHub CLI/gh.exe" "/c/Program Files/GitHub CLI/gh.exe" "/cygdrive/c/Program Files/GitHub CLI/gh.exe"
do
if [ -x "$candidate" ]
then
Expand Down Expand Up @@ -51,7 +51,7 @@ do

# Get PR number from the git commit title
pr="$(echo "$line" | grep '#[1-9][0-9][0-9][0-9][0-9]*' | sed 's|.* (\#\([1-9][0-9][0-9][0-9][0-9]*\))|\1|')"
[ "x$pr" = "x" ] && break
[ "x$pr" = "x" ] && continue

# Check if the PR is marked as a breaking change
if "$gh" issue view $pr --json labels | grep -q 'pr: breaking change'
Expand Down

0 comments on commit 25d1559

Please sign in to comment.