Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick] Update update-release-tracker.sh #60

Merged
merged 1 commit into from
Jun 20, 2020
Merged
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
14 changes: 10 additions & 4 deletions hack/scripts/update-release-tracker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,30 @@ parse_url() {
export RELEASE_TRACKER_PR=${PARTS[4]}
}

RELEASE_TRACKER=
RELEASE_TRACKER=${RELEASE_TRACKER:-}
GITHUB_BASE_REF=${GITHUB_BASE_REF:-}

while IFS=$': \r\t' read -r -u9 marker v; do
case $marker in
Release-tracker)
export RELEASE_TRACKER=$v
export RELEASE_TRACKER=$(echo $v | tr -d '\r\t')
;;
Release)
export RELEASE=$v
export RELEASE=$(echo $v | tr -d '\r\t')
;;
esac
done 9< <(git show -s --format=%b)

[ ! -z $RELEASE_TRACKER ] || {
[ ! -z "$RELEASE_TRACKER" ] || {
echo "Release-tracker url not found."
exit 0
}

[ ! -z "$GITHUB_BASE_REF" ] || {
echo "GitHub base ref not found."
exit 0
}

parse_url $RELEASE_TRACKER
api_url="repos/${RELEASE_TRACKER_OWNER}/${RELEASE_TRACKER_REPO}/issues/${RELEASE_TRACKER_PR}/comments"

Expand Down