chore: Stop failing tagging on invalid issue links

main
Christof 2022-06-16 15:47:09 +02:00
parent 8a16e8689a
commit 2594d13989
No known key found for this signature in database
GPG Key ID: FE6B8344731C047E
1 changed files with 0 additions and 3 deletions

View File

@ -35,7 +35,6 @@ echo "Finding merged pull requests between $BASE_TAG and $LATEST_TAG..."
PRs=$(git log --pretty=oneline "$BASE_TAG"..."$LATEST_TAG" | grep 'Merge pull request #' | grep -oE '#[0-9]+' | sed 's/#//') PRs=$(git log --pretty=oneline "$BASE_TAG"..."$LATEST_TAG" | grep 'Merge pull request #' | grep -oE '#[0-9]+' | sed 's/#//')
# Find fixed issues from $BASE_TAG to $LATEST_TAG # Find fixed issues from $BASE_TAG to $LATEST_TAG
EXIT_CODE=0
ISSUES=() ISSUES=()
for pr in $PRs; do for pr in $PRs; do
id=$($GHCLI_BIN pr view "$pr" --json body | grep -oE '(Related issues \| )(.*)?[0-9]+(.*|\r|\n)?(\|)' | sed 's/[^[:digit:]]//g' | sed -z 's/\n//g' || true) id=$($GHCLI_BIN pr view "$pr" --json body | grep -oE '(Related issues \| )(.*)?[0-9]+(.*|\r|\n)?(\|)' | sed 's/[^[:digit:]]//g' | sed -z 's/\n//g' || true)
@ -44,7 +43,6 @@ for pr in $PRs; do
fi fi
if ! $GHCLI_BIN issue view "$id" --json title &> /dev/null; then if ! $GHCLI_BIN issue view "$id" --json title &> /dev/null; then
echo "Invalid issue $id for pull request $pr. Skipping." echo "Invalid issue $id for pull request $pr. Skipping."
EXIT_CODE=1
continue continue
fi fi
ISSUES+=("$id") ISSUES+=("$id")
@ -75,4 +73,3 @@ for issue in "${ISSUES[@]}"; do
done done
echo "Done." echo "Done."
exit $EXIT_CODE