File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -35,28 +35,28 @@ PRs=$(git log --pretty=oneline "$BASE_TAG"..."$LATEST_TAG" | grep 'Merge pull re
3535# Find fixed issues from $BASE_TAG to $LATEST_TAG
3636ISSUES=()
3737for pr in $PRs ; do
38- id=$( $GHCLI_BIN pr view " $pr " --json body | grep -oE ' Related issues | #[0-9]+' | sed ' s/[^[:digit:]]//g' | sed -z ' s/\n//g' )
38+ id=$( $GHCLI_BIN pr view " $pr " --json body | grep -oE ' Related issues | (.*)?[0-9]+(.*)?\|' | sed ' s/[^[:digit:]]//g' | sed -z ' s/\n//g' || true)
39+ if [ -z " $id " ]; then
40+ continue
41+ fi
3942 ISSUES+=(" $id " )
4043done
4144
42- echo " Creating milestone $BASE_TAG in github.com/$REPO "
45+ echo " Creating milestone $LATEST_TAG in github.com/$REPO "
4346curl -X POST \
4447 -H " Accept: application/vnd.github.v3+json" \
4548 -H " Authorization: token $GITHUB_TOKEN " \
46- --data " {\" title\" :\" $BASE_TAG \" }" \
47- " https://api.github.com/repos/$REPO /milestone "
49+ --data " {\" title\" :\" $LATEST_TAG \" }" \
50+ " https://api.github.com/repos/$REPO /milestones "
4851
4952for issue in " ${ISSUES[@]} " ; do
50- if [ -z " $issue " ]; then
51- continue
52- fi
53- echo " Adding milestone $BASE_TAG to issue #$issue "
54- gh issue edit " $issue " -m " $BASE_TAG "
53+ echo " Adding milestone $LATEST_TAG to issue #$issue "
54+ gh issue edit " $issue " -m " $LATEST_TAG "
5555
5656 curl -X POST \
5757 -H " Accept: application/vnd.github.v3+json" \
5858 -H " Authorization: token $GITHUB_TOKEN " \
59- --data " {\" body\" :\" This issue has been referenced in the latest release $BASE_TAG .\" }" \
59+ --data " {\" body\" :\" This issue has been referenced in the latest release $LATEST_TAG .\" }" \
6060 " https://api.github.com/repos/$REPO /issues/$issue /comments"
6161done
6262
You can’t perform that action at this time.
0 commit comments