Skip to content

fix(INFRA-3037): refactor, remove release scripts dups#195

Merged
jluque0101 merged 3 commits intomainfrom
chore/INFRA-3067-ref-duplication
Jan 19, 2026
Merged

fix(INFRA-3037): refactor, remove release scripts dups#195
jluque0101 merged 3 commits intomainfrom
chore/INFRA-3067-ref-duplication

Conversation

@jluque0101
Copy link
Contributor

@jluque0101 jluque0101 commented Dec 19, 2025

  • What is the current state of things and why does it need to change?

  • What is the solution your changes offer and how does it work?

    • Extract shared helper functions into a centralized utils.sh
    • Delegate changelog management from create-platform-release-pr.sh to update-release-changelog.sh
    • Fix bugs in hotfix detection, branch creation, and PR existence checks
    • Improve script documentation and parameter consistency
    • No changes required on consumer repositories

Are there any issues or other links reviewers should consult to understand this pull request better? For instance:

See:


Note

Refactors release automation to remove duplicated logic and harden workflows.

  • Adds utils.sh with shared configure_git, checkout_or_create_branch, push_branch_with_handling, create_pr_if_not_exists; both scripts now source it
  • create-platform-release-pr.sh: uses helper for branch checkout, honors BASE_BRANCH, fixes configure_git usage, exports author env, and delegates changelog work to update-release-changelog.sh (still generates commits.csv pre-delegation for non-hotfix)
  • update-release-changelog.sh: removes duplicated helpers, supports optional previous_version_ref, changelog branch override, and explicit version input; derives version from branch when absent; syncs release branch, skips PR if no diffs, and omits commits.csv generation
  • Improves PR existence checks, hotfix detection, and parameter/docs consistency without changing consumer-facing behavior

Written by Cursor Bugbot for commit 5ddb355. This will update automatically on new commits. Configure here.

@jluque0101
Copy link
Contributor Author

bugbot run

@jluque0101
Copy link
Contributor Author

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@jluque0101
Copy link
Contributor Author

bugbot run

@jluque0101
Copy link
Contributor Author

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@jluque0101 jluque0101 marked this pull request as ready for review December 19, 2025 15:57
@Qbandev Qbandev requested a review from Copilot December 19, 2025 16:00
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 refactors the release automation scripts by extracting shared utility functions into a centralized location, improving code maintainability and reducing duplication across release workflows.

Key Changes:

  • Extract shared git/branch/PR helper functions into a reusable utilities module
  • Create standalone changelog updater script with enhanced parameterization
  • Improve branch and version handling with better defaults and validation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/scripts/utils.sh New shared utilities file containing reusable functions (configure_git, checkout_or_create_branch, push_branch_with_handling, create_pr_if_not_exists) for release scripts
.github/scripts/update-release-changelog.sh Updated to source shared utilities, add support for custom changelog branch and explicit version parameters, and improve documentation
.github/scripts/create-platform-release-pr.sh Refactored to source and use shared utilities, delegate changelog operations to standalone script, export git identity via environment variables, and add BASE_BRANCH parameterization
Comments suppressed due to low confidence (1)

.github/scripts/create-platform-release-pr.sh:49

  • The BASE_BRANCH variable is assigned on line 40 but is not included in the debug logging section (lines 42-49). For consistency with other variables and to aid in debugging, consider adding it to the log output:
echo "BASE_BRANCH: $BASE_BRANCH"
BASE_BRANCH="${BASE_BRANCH:-main}"

# Log assigned variables for debugging (after defaults and trimming)
echo "Assigned variables:"
echo "PLATFORM: $PLATFORM"
echo "PREVIOUS_VERSION_REF: $PREVIOUS_VERSION_REF"
echo "NEW_VERSION: $NEW_VERSION"
echo "NEW_VERSION_NUMBER: $NEW_VERSION_NUMBER"
echo "GIT_USER_NAME: $GIT_USER_NAME"
echo "GIT_USER_EMAIL: $GIT_USER_EMAIL"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jluque0101 jluque0101 marked this pull request as draft January 5, 2026 12:14
@jluque0101
Copy link
Contributor Author

@copilot

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jluque0101
Copy link
Contributor Author

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jluque0101 jluque0101 marked this pull request as ready for review January 6, 2026 13:22
@jluque0101 jluque0101 force-pushed the chore/INFRA-3067-ref-duplication branch from 66ba953 to e5a2948 Compare January 7, 2026 09:45
@jluque0101 jluque0101 changed the title chore(INFRA-3037): refactor, remove release scripts dups fix(INFRA-3037): refactor, remove release scripts dups Jan 7, 2026
@Qbandev Qbandev requested a review from Copilot January 7, 2026 10:07
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jluque0101 jluque0101 merged commit 8db03df into main Jan 19, 2026
27 checks passed
@jluque0101 jluque0101 deleted the chore/INFRA-3067-ref-duplication branch January 19, 2026 08:56
@cursor cursor bot mentioned this pull request Jan 20, 2026
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.

2 participants