Skip to content

Commit ae4d952

Browse files
authored
Update Pull from Upstream and Merge PRs.yml
1 parent 6eee329 commit ae4d952

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/Pull from Upstream and Merge PRs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ jobs:
148148
PR_NUMBER=$(echo $PR_NUMBER | xargs) # Trim whitespace
149149
150150
# Check if PR is already merged upstream
151-
if git log upstream/master --grep="Merge pull request #$PR_NUMBER" --oneline | grep -q "#$PR_NUMBER"; then
152-
echo "✓ PR #$PR_NUMBER is already merged upstream" >> pr_status.txt
151+
if git log upstream/master --grep="Merge pull request $PR_NUMBER" --oneline | grep -q "$PR_NUMBER"; then
152+
echo "✓ PR $PR_NUMBER is already merged upstream" >> pr_status.txt
153153
else
154-
echo "○ PR #$PR_NUMBER needs to be merged" >> pr_status.txt
154+
echo "○ PR $PR_NUMBER needs to be merged" >> pr_status.txt
155155
echo "$PR_NUMBER" >> prs_to_merge.txt
156156
fi
157157
done
@@ -171,30 +171,30 @@ jobs:
171171
echo "" >> merge_results.txt
172172
173173
while IFS= read -r PR_NUMBER; do
174-
echo "Processing PR #$PR_NUMBER"
174+
echo "Processing PR $PR_NUMBER"
175175
176176
# Fetch the PR branch
177177
if git fetch upstream pull/$PR_NUMBER/head:pr-$PR_NUMBER; then
178-
echo "Fetched PR #$PR_NUMBER successfully"
178+
echo "Fetched PR $PR_NUMBER successfully"
179179
180180
# Check if this PR can be merged
181181
MERGE_BASE=$(git merge-base HEAD pr-$PR_NUMBER)
182182
if git merge-tree $MERGE_BASE HEAD pr-$PR_NUMBER | grep -q '^<<<<<<<'; then
183-
echo "⚠️ PR #$PR_NUMBER would cause conflicts - skipping" >> merge_results.txt
183+
echo "⚠️ PR $PR_NUMBER would cause conflicts - skipping" >> merge_results.txt
184184
else
185185
# Try to merge the PR
186-
if git merge pr-$PR_NUMBER --no-ff -m "Merge PR #$PR_NUMBER"; then
187-
echo "✅ Merged PR #$PR_NUMBER successfully" >> merge_results.txt
186+
if git merge pr-$PR_NUMBER --no-ff -m "Merge PR $PR_NUMBER"; then
187+
echo "✅ Merged PR $PR_NUMBER successfully" >> merge_results.txt
188188
189189
# Clean up the PR branch
190190
git branch -D pr-$PR_NUMBER
191191
else
192-
echo "❌ Failed to merge PR #$PR_NUMBER (unexpected error)" >> merge_results.txt
192+
echo "❌ Failed to merge PR $PR_NUMBER (unexpected error)" >> merge_results.txt
193193
git merge --abort
194194
fi
195195
fi
196196
else
197-
echo "❌ Failed to fetch PR #$PR_NUMBER (PR may not exist or is closed)" >> merge_results.txt
197+
echo "❌ Failed to fetch PR $PR_NUMBER (PR may not exist or is closed)" >> merge_results.txt
198198
fi
199199
done < prs_to_merge.txt
200200

0 commit comments

Comments
 (0)