Skip to content

Commit

Permalink
Actually checkout 'deploy' after creating the pull request.
Browse files Browse the repository at this point in the history
We need to be on 'deploy', not 'master'.   The 'return' will end the execution, so it never checks out Deploy correctly.  Check out the Deploy branch *before* returning.
  • Loading branch information
teward committed Dec 28, 2016
1 parent eb7e510 commit bd89f16
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gitmanager.py
Expand Up @@ -85,6 +85,7 @@ def add_to_blacklist(self, **kwargs):
response = requests.post("https://api.github.com/repos/Charcoal-SE/SmokeDetector/pulls", auth=HTTPBasicAuth(GlobalVars.github_username, GlobalVars.github_password), data=json.dumps(payload))
print(response.json())
try:
git.checkout("deploy") # Return to deploy, pending the accept of the PR in Master.
return (True, "You don't have code privileges, but I've [created a pull request for you]({0}).".format(response.json()["html_url"]))
except KeyError:
# Error capture/checking for any "invalid" GH reply without an 'html_url' item, which will throw a KeyError.
Expand Down

0 comments on commit bd89f16

Please sign in to comment.