Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix? Delete undeleted branches #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/pulltester.php
Expand Up @@ -149,7 +149,7 @@ protected function processPull($pull)
try
{
$store = $this->table->store();
}
}
catch (Exception $e)
{
echo $e->getMessage();
Expand Down Expand Up @@ -200,6 +200,12 @@ protected function build($pull)
}

exec('git checkout staging');

//-- Just in case, if, for any oscure reason, the branch we are trying to create already exists...
//-- git wont switch to it and will remain on the 'staging' branch so...
//-- let's first try to delete it =;)
exec('git branch -D pull'.$pull->number.' 2>/dev/null');

exec('git checkout -b pull' . $pull->number);
exec('git fetch ' . $pull->user->login);

Expand Down