Skip to content
Open
Prev Previous commit
Next Next commit
INFRA-3187: Code review fixes
  • Loading branch information
XxdpavelxX committed Dec 9, 2025
commit 2b07d72f5e5dd908404885ba0015d853d55ca33b
11 changes: 7 additions & 4 deletions .github/scripts/merge-previous-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ merge_with_favor_destination() {
# If merge still fails (shouldn't happen with -X ours, but just in case)
echo "⚠️ Merge conflict detected! Resolving by favoring destination branch (new release)..."

# Add all files and resolve conflicts by keeping destination version
git_exec add .

# For any remaining conflicts, checkout our version
# First, resolve any unmerged (conflicted) files by keeping our version
local conflict_files
local conflict_count=0
conflict_files=$(git diff --name-only --diff-filter=U 2>/dev/null || true)
Expand All @@ -96,6 +93,12 @@ merge_with_favor_destination() {
echo "✅ Resolved ${conflict_count} conflict(s) by keeping destination branch version"
fi

# Now add any remaining files (non-conflicted changes)
git_exec add .

# Reset .gitignore to avoid committing workflow-specific changes (github-tools/ entry)
git checkout HEAD -- .gitignore 2>/dev/null || true

# Complete the merge
local status
status=$(git status --porcelain)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/merge-previous-releases.yml
Copy link
Member

Choose a reason for hiding this comment

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

Is this workflow necessary now? The action can be called from other repositories directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I removed the workflow

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/checkout@v5
with:
repository: metamask/github-tools
ref: INFRA-3187-AutomateMergingReleaseBranches
path: ./github-tools

- name: Set Git user and email
Expand Down
Loading