Repair Switching Branches and PRs (#1541)

This commit is contained in:
Christian Rotzoll 2020-09-14 12:37:58 +02:00 committed by GitHub
parent 96f107f2c3
commit 0e79d54d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,13 +177,28 @@ patch()
if [ $exitstatus = 0 ]; then
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
echo "--> " $newGitHubBranch
sudo -u admin /home/admin/XXsyncScripts.sh ${newGitHubBranch}
sleep 4
fi
patch
exit 1
;;
PR)
clear
echo "..."
pullRequestID=$(whiptail --inputbox "\nPlease enter the NUMBER of the PullRequest on RaspiBlitz Repo '${activeGitHubUser}'?" 10 46 --title "Checkout PullRequest ID" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
pullRequestID=$(echo "${pullRequestID}" | cut -d " " -f1)
echo "--> " $pullRequestID
cd /home/admin/raspiblitz
git fetch origin pull/${pullRequestID}/head:${pullRequestID}pr
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh -run ${newGitHubBranch})
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${pullRequestID}pr)
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
fi
fi
patch
exit 1
;;
PR)