Skip to content

Commit

Permalink
Update get_release_notes.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
goergisn authored Jan 31, 2025
1 parent 7580c9a commit c5656c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/get_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ jobs:
run: |
# Get the latest tag
LATEST_TAG=$(git describe --tags --abbrev=0)
echo "Latest Tag: $LATEST_TAG"
# Get the commit messages since the latest tag
COMMITS=$(git log --oneline "$LATEST_TAG"..HEAD)
echo "Commits: $COMMITS"
# Convert the labels string to an array
IFS=',' read -r -a ALLOWED_LABELS_ARRAY <<< "$ALLOWED_LABELS"
Expand All @@ -49,8 +51,9 @@ jobs:
# Loop through each label and find matching commits
for LABEL in "${ALLOWED_LABELS_ARRAY[@]}"; do
LABEL=$(echo "$LABEL" | xargs) # Trim spaces
echo "Label: $LABEL"
LABEL_OUTPUT=$(echo "$COMMITS" | awk "/<$LABEL>/,/<\/$LABEL>/" | sed "s/<$LABEL>//g; s/<\/$LABEL>//g" | xargs)
echo "Output: $LABEL_OUTPUT"
if [ -n "$LABEL_OUTPUT" ]; then
OUTPUT="$OUTPUT\n## $LABEL\n$LABEL_OUTPUT"
fi
Expand Down

0 comments on commit c5656c7

Please sign in to comment.