Skip to content

Conversation

@n3rdc4ptn
Copy link
Member

@n3rdc4ptn n3rdc4ptn commented Jun 26, 2025

What this PR does / why we need it:
fixes generate-changelog for fresh started repos.

…xed pr_commits fetching, so support empty git logs
@n3rdc4ptn n3rdc4ptn requested review from Copilot and moelsayed and removed request for Copilot June 26, 2025 14:23

This comment was marked as outdated.

@n3rdc4ptn n3rdc4ptn requested a review from Copilot June 26, 2025 14:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the changelog generator to support repositories without any existing release tags and prevents failures when no PR numbers are found in commit messages.

  • Use an empty-string check instead of a file-existence test to detect the first release
  • Add || true to the PR_COMMITS pipeline to avoid script errors on empty results
Comments suppressed due to low confidence (2)

generate-changelog.sh:14

  • [nitpick] The comment # first release? is ambiguous; consider clarifying it to indicate that this branch handles the case when no release tag was found.
if [[ -z "$LATEST_RELEASE_TAG" ]]; then # first release?

generate-changelog.sh:14

  • Add a test case for repositories with no existing release tags to verify that generate-changelog.sh correctly falls back to the initial commit.
if [[ -z "$LATEST_RELEASE_TAG" ]]; then # first release?

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@n3rdc4ptn n3rdc4ptn removed the request for review from moelsayed June 30, 2025 13:37
@n3rdc4ptn n3rdc4ptn changed the title fix: fixed latest_release_tag fetching with correct if statement & fi… fix: generate changelog generation for first time repos Jun 30, 2025
Copy link
Contributor

@reshnm reshnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@n3rdc4ptn n3rdc4ptn merged commit 59f6f6f into main Jun 30, 2025
3 checks passed
@n3rdc4ptn n3rdc4ptn deleted the fix-generate-changelog branch June 30, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants