Skip to content

feat: enhance changelog workflow and container logging #30

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
merged 1 commit into from
Nov 19, 2024
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
21 changes: 19 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
types: [closed]
branches:
- main
- develop

jobs:
update-changelog:
Expand Down Expand Up @@ -73,9 +72,27 @@ jobs:
DATE=$(date +%Y-%m-%d)
echo "Generating changelog entry for date: $DATE"

# Get PR details with better merge handling
PR_TITLE="${{ steps.pr-info.outputs.title }}"
PR_BODY="${{ steps.pr-info.outputs.body }}"

# Special handling for develop->main merges
if [[ "$PR_TITLE" == "Merge branch 'develop' into main" ]]; then
echo "Detected develop->main merge, analyzing commit messages"
# Get all commits since last merge to main
COMMITS=$(git log --format="%s" HEAD^..HEAD)
# Look for feature or breaking changes in commits
if echo "$COMMITS" | grep -q "!\\|BREAKING CHANGE"; then
PR_TITLE="BREAKING CHANGE: Updates from develop branch"
elif echo "$COMMITS" | grep -q "feat:\\|feature:"; then
PR_TITLE="feat: Updates from develop branch"
else
PR_TITLE="fix: Updates from develop branch"
fi
fi

# Increment version based on PR title
IFS='.' read -r major minor patch <<< "$CURRENT_VERSION"
PR_TITLE="${{ steps.pr-info.outputs.title }}"
echo "Processing PR title: $PR_TITLE"

# Version increment logic with error handling
Expand Down