-
Notifications
You must be signed in to change notification settings - Fork 43
FIX: Release Note Generation #1227
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Access token will be required. Check to ensure that is it provied | ||
if [[ -z "$GITHUB_TOKEN" ]]; then | ||
echo "GITHUB_TOKEN must be set" | ||
fi | ||
auth_header="-H Authorization: Bearer $GITHUB_TOKEN" | ||
|
||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
source $script_dir/shared.sh | ||
|
||
# Get latest release version | ||
log "Getting 'latest' release version tag" | ||
previous_tag_name=$(curl -L "https://api.github.com/repos/kuadrant/kuadrant-operator/releases/latest" -H "Accept: apllication/vnd.github+json" | yq '.tag_name') | ||
didierofrivia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
log "'latest' released version is $previous_tag_name" | ||
|
||
# Get current release tag | ||
log "Getting this releases tag" | ||
release_tag=$KUADRANT_OPERATOR_TAG | ||
log "Release in progress for $KUADRANT_OPERATOR_TAG" | ||
|
||
# Generate the release change log | ||
log "Generate release change log" | ||
payload=$(cat <<EOF | ||
{"tag_name": "$release_tag","previous_tag_name": "$previous_tag_name"} | ||
EOF | ||
) | ||
|
||
data=$(curl -L "https://api.github.com/repos/kuadrant/kuadrant-operator/releases/generate-notes" -X POST -H "Accept: apllication/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" -d "$payload") | ||
|
||
release_body_data=$(echo $data | yq '.body') | ||
release_body="**This release enables installations of Authorino Operator v$AUTHORINO_OPERATOR_VERSION, Limitador Operator v$LIMITADOR_OPERATOR_VERSION, DNS Operator v$DNS_OPERATOR_VERSION, WASM Shim v$WASM_SHIM_VERSION and ConsolePlugin $CONSOLEPLUGIN_URL**$release_body_data" | ||
|
||
if [[ $_log == "1" ]]; then | ||
log "releaseBody=$release_body" | ||
fi | ||
|
||
if [[ $dry_run == "0" ]]; then | ||
echo "releaseBody=$release_body" >> "$GITHUB_ENV" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checking, I have a feeling we can't remove it from the |
||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a
TODO
annotation so we can easily track this?