Created
March 4, 2015 04:08
-
-
Save hitman401/bce91c4e560728c5d833 to your computer and use it in GitHub Desktop.
maidsafe.github.io pull from PR to be changed later. This one doesn't work as of now but must check why this fails while switching between PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance.pullForPR = function(selectedPR) { | |
if (!openPR.hasOwnProperty(selectedPR)) { | |
return 'echo pull failed - PR not found for selection && exit 1'; | |
}var command; | |
var actualLocalBranchName; | |
actualLocalBranchName = selectedPR.replace(/ /g, '_'); | |
command = (branches.indexOf(actualLocalBranchName) > -1) ? 'git branch -D ' + actualLocalBranchName + ' && ': ''; | |
command += instance.CLI.checkout(openPR[selectedPR].base.ref) + '&&' + instance.CLI.pull() + '&&' + | |
instance.CLI.checkout(selectedPR, true) + '&&' + | |
instance.CLI.pullRemote(openPR[selectedPR].head.repo.clone_url, openPR[selectedPR].head.ref); | |
return command; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Must add listBranches task in grunt:pr