fix(INFRA-3037): refactor, remove release scripts dups#195
Conversation
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
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_BRANCHvariable 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.
|
@copilot |
There was a problem hiding this comment.
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.
|
bugbot run |
There was a problem hiding this comment.
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.
66ba953 to
e5a2948
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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?
utils.shcreate-platform-release-pr.shtoupdate-release-changelog.shAre there any issues or other links reviewers should consult to understand this pull request better? For instance:
See:
https://github.com/consensys-test/metamask-extension-infra-3037
https://github.com/consensys-test/metamask-mobile-infra-3037
Note
Refactors release automation to remove duplicated logic and harden workflows.
utils.shwith sharedconfigure_git,checkout_or_create_branch,push_branch_with_handling,create_pr_if_not_exists; both scripts now source itcreate-platform-release-pr.sh: uses helper for branch checkout, honorsBASE_BRANCH, fixesconfigure_gitusage, exports author env, and delegates changelog work toupdate-release-changelog.sh(still generatescommits.csvpre-delegation for non-hotfix)update-release-changelog.sh: removes duplicated helpers, supports optionalprevious_version_ref, changelog branch override, and explicit version input; derives version from branch when absent; syncs release branch, skips PR if no diffs, and omitscommits.csvgenerationWritten by Cursor Bugbot for commit 5ddb355. This will update automatically on new commits. Configure here.