-
Notifications
You must be signed in to change notification settings - Fork 762
feat: Add upstream release notes links to chart releases : #1594 #1771
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
Merged
dmitryax
merged 3 commits into
open-telemetry:main
from
fidelity-contributions:feature/work-on-1594
Feb 13, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Configuration for chart-releaser | ||
| # Enable automatic generation of release notes | ||
| generate-release-notes: true | ||
|
|
||
| # Repository configuration | ||
| owner: open-telemetry | ||
| git-repo: opentelemetry-helm-charts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| #!/bin/bash | ||
| # Script to enhance release notes with upstream OpenTelemetry project links | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Function to update release notes for a chart | ||
| update_release_notes() { | ||
| local chart_name="$1" | ||
| local chart_version="$2" | ||
| local app_version="$3" | ||
| local release_tag="${chart_name}-${chart_version}" | ||
|
|
||
| echo "Updating release notes for ${release_tag}" | ||
|
|
||
| # Generate enhanced release notes | ||
| enhanced_notes=$(.github/scripts/generate-release-notes.sh "$chart_name" "$chart_version" "$app_version" "charts/$chart_name/") | ||
|
|
||
| # Get the current release notes | ||
| current_notes=$(gh release view "$release_tag" --json body --jq '.body' 2>/dev/null || echo "") | ||
|
|
||
| if [[ -z "$current_notes" ]]; then | ||
| echo "ERROR: No existing release notes found for ${release_tag}. This indicates a problem with the chart-releaser process." | ||
| echo "Expected chart-releaser to generate initial release notes, but none were found." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Combine current notes with enhanced notes | ||
| combined_notes="$current_notes | ||
|
|
||
| --- | ||
|
|
||
| $enhanced_notes" | ||
|
|
||
| # Update the release notes | ||
| gh release edit "$release_tag" --notes "$combined_notes" | ||
| } | ||
|
|
||
| # Main function to enhance release notes for recent releases | ||
| enhance_release_notes() { | ||
| # Check each chart for recent releases | ||
| for chart_dir in charts/*/; do | ||
| if [ -f "${chart_dir}Chart.yaml" ]; then | ||
| chart_name=$(basename "$chart_dir") | ||
| chart_version=$(grep '^version:' "${chart_dir}Chart.yaml" | cut -d' ' -f2) | ||
| app_version=$(grep '^appVersion:' "${chart_dir}Chart.yaml" | cut -d' ' -f2) | ||
| release_tag="${chart_name}-${chart_version}" | ||
|
|
||
| # Check if this release was just created (within the last 5 minutes) | ||
| if gh release view "$release_tag" >/dev/null 2>&1; then | ||
| release_date=$(gh release view "$release_tag" --json publishedAt --jq '.publishedAt') | ||
| release_timestamp=$(date -d "$release_date" +%s) | ||
| current_timestamp=$(date +%s) | ||
| time_diff=$((current_timestamp - release_timestamp)) | ||
|
|
||
| # If release was created within the last 5 minutes (300 seconds), check if appVersion changed | ||
| if [[ $time_diff -lt 300 ]]; then | ||
| # Check if appVersion changed compared to the previous chart version | ||
| previous_chart_version=$(git tag -l "${chart_name}-*" --sort=-version:refname | grep -v "^${release_tag}$" | head -1) | ||
|
|
||
| if [[ -n "$previous_chart_version" ]]; then | ||
| # Get the previous appVersion from git | ||
| previous_app_version=$(git show "${previous_chart_version}:charts/${chart_name}/Chart.yaml" 2>/dev/null | grep '^appVersion:' | cut -d' ' -f2 || echo "") | ||
|
|
||
| if [[ "$app_version" != "$previous_app_version" && -n "$previous_app_version" ]]; then | ||
| echo "AppVersion changed from ${previous_app_version} to ${app_version} - enhancing release notes" | ||
| update_release_notes "$chart_name" "$chart_version" "$app_version" | ||
| else | ||
| echo "AppVersion unchanged (${app_version}) - skipping release notes enhancement for ${release_tag}" | ||
| fi | ||
| else | ||
| echo "No previous release found - enhancing release notes for initial release ${release_tag}" | ||
| update_release_notes "$chart_name" "$chart_version" "$app_version" | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
| done | ||
| } | ||
|
|
||
| # Execute main function | ||
| enhance_release_notes | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/bin/bash | ||
| # Script to generate release notes with links to upstream OpenTelemetry releases | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Function to get OpenTelemetry Collector release notes URL | ||
| get_otel_collector_release_url() { | ||
| local version="$1" | ||
| echo "https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v${version}" | ||
| } | ||
|
|
||
| # Function to get OpenTelemetry Collector Contrib release notes URL | ||
| get_otel_collector_contrib_release_url() { | ||
| local version="$1" | ||
| echo "https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v${version}" | ||
| } | ||
|
|
||
| # Function to get OpenTelemetry Operator release notes URL | ||
| get_otel_operator_release_url() { | ||
| local version="$1" | ||
| echo "https://github.com/open-telemetry/opentelemetry-operator/releases/tag/v${version}" | ||
| } | ||
|
|
||
| # Function to get OpenTelemetry Demo release notes URL | ||
| get_otel_demo_release_url() { | ||
| local version="$1" | ||
| echo "https://github.com/open-telemetry/opentelemetry-demo/releases/tag/v${version}" | ||
| } | ||
|
|
||
| # Function to generate release notes for a specific chart | ||
| generate_release_notes() { | ||
| local chart_name="$1" | ||
| local chart_version="$2" | ||
| local app_version="$3" | ||
| local chart_path="$4" | ||
|
|
||
| echo "# ${chart_name} ${chart_version}" | ||
| echo "" | ||
| echo "## What's Changed" | ||
| echo "" | ||
| echo "This release updates the ${chart_name} to version ${app_version}." | ||
| echo "" | ||
|
|
||
| # Add links to release notes | ||
| echo "## OpenTelemetry Release Notes" | ||
| echo "" | ||
| case "$chart_name" in | ||
| "opentelemetry-collector") | ||
| echo "- [OpenTelemetry Collector v${app_version}]($(get_otel_collector_release_url "$app_version"))" | ||
| echo "- [OpenTelemetry Collector Contrib v${app_version}]($(get_otel_collector_contrib_release_url "$app_version"))" | ||
| ;; | ||
| "opentelemetry-operator") | ||
| echo "- [OpenTelemetry Operator v${app_version}]($(get_otel_operator_release_url "$app_version"))" | ||
| ;; | ||
| "opentelemetry-demo") | ||
| echo "- [OpenTelemetry Demo v${app_version}]($(get_otel_demo_release_url "$app_version"))" | ||
| ;; | ||
| "opentelemetry-target-allocator") | ||
| echo "- [OpenTelemetry Operator v${app_version}]($(get_otel_operator_release_url "$app_version")) (Target Allocator is part of the Operator project)" | ||
| ;; | ||
| *) | ||
| echo "See upstream OpenTelemetry project releases for details." | ||
| ;; | ||
| esac | ||
| echo "" | ||
|
|
||
| echo "## Chart Information" | ||
| echo "" | ||
| echo "- **Chart Version**: ${chart_version}" | ||
| echo "- **App Version**: ${app_version}" | ||
| echo "- **Chart Path**: ${chart_path}" | ||
| } | ||
|
|
||
| # Main execution | ||
| if [ $# -ne 4 ]; then | ||
| echo "Usage: $0 <chart_name> <chart_version> <app_version> <chart_path>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| generate_release_notes "$1" "$2" "$3" "$4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.