mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Update merge-upstream-pull-request.sh
This commit is contained in:
@@ -69,9 +69,10 @@ git checkout -b "$BASE_BRANCH_NAME$1"
|
|||||||
readonly MERGE_SHA=$(curl --silent "$BASE_PULL_URL/$1" | jq '.merge_commit_sha' -r)
|
readonly MERGE_SHA=$(curl --silent "$BASE_PULL_URL/$1" | jq '.merge_commit_sha' -r)
|
||||||
|
|
||||||
# Get the commits
|
# Get the commits
|
||||||
readonly COMMITS=$(curl "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r)
|
readonly COMMITS=$(curl --silent "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r)
|
||||||
|
|
||||||
# Cherry pick onto the new branch
|
# Cherry pick onto the new branch
|
||||||
|
echo "Cherry picking onto branch"
|
||||||
CHERRY_PICK_OUTPUT=$(git cherry-pick -m 1 "$MERGE_SHA" 2>&1)
|
CHERRY_PICK_OUTPUT=$(git cherry-pick -m 1 "$MERGE_SHA" 2>&1)
|
||||||
echo "$CHERRY_PICK_OUTPUT"
|
echo "$CHERRY_PICK_OUTPUT"
|
||||||
|
|
||||||
@@ -94,14 +95,16 @@ if echo "$CHERRY_PICK_OUTPUT" | grep -i 'error: mainline was specified but commi
|
|||||||
git add -A .
|
git add -A .
|
||||||
git cherry-pick --continue
|
git cherry-pick --continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
# Add all files onto this branch
|
# Add all files onto this branch
|
||||||
|
echo "Adding files to branch:"
|
||||||
git add -A .
|
git add -A .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Commit these changes
|
# Commit these changes
|
||||||
|
echo "Commiting changes"
|
||||||
git commit --allow-empty -m "$2"
|
git commit --allow-empty -m "$2"
|
||||||
|
|
||||||
# Push them onto the branch
|
# Push them onto the branch
|
||||||
|
echo "Pushing changes"
|
||||||
git push -u origin "$BASE_BRANCH_NAME$1"
|
git push -u origin "$BASE_BRANCH_NAME$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user