mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +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)
|
||||
|
||||
# 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
|
||||
echo "Cherry picking onto branch"
|
||||
CHERRY_PICK_OUTPUT=$(git cherry-pick -m 1 "$MERGE_SHA" 2>&1)
|
||||
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 cherry-pick --continue
|
||||
fi
|
||||
|
||||
else
|
||||
# Add all files onto this branch
|
||||
echo "Adding files to branch:"
|
||||
git add -A .
|
||||
fi
|
||||
|
||||
# Commit these changes
|
||||
echo "Commiting changes"
|
||||
git commit --allow-empty -m "$2"
|
||||
|
||||
# Push them onto the branch
|
||||
echo "Pushing changes"
|
||||
git push -u origin "$BASE_BRANCH_NAME$1"
|
||||
|
||||
Reference in New Issue
Block a user