from subprocess import check_call

from blackbelt.handle_github import get_current_branch
from blackbelt.messages import post_message


def deploy_staging():
    branch_name = get_current_branch()

    post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")

    check_call(['grunt', 'deploy', '--app=apiary-staging', '--force', "--branch=%s" % branch_name])

def deploy_production():
    post_message("Deploying to production", "#deploy-queue")

    check_call(['grunt', 'deploy'])

from subprocess import check_call

from blackbelt.handle_github import get_current_branch
from blackbelt.messages import post_message


def deploy_staging():
    branch_name = get_current_branch()

    post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")

    check_call(['grunt', 'deploy', '--app=apiary-staging-pool1', '--force', "--branch=%s" % branch_name])

def deploy_production():
    post_message("Deploying to production", "#deploy-queue")

    check_call(['grunt', 'deploy'])
    check_call(['grunt', 'deploy', '--app=apiary-staging'])

Update deploy and stage with new environ
feat: Update deploy and stage with new environ
  from subprocess import check_call
  
  from blackbelt.handle_github import get_current_branch
  from blackbelt.messages import post_message
  
  
  def deploy_staging():
      branch_name = get_current_branch()
  
      post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")
  
-     check_call(['grunt', 'deploy', '--app=apiary-staging', '--force', "--branch=%s" % branch_name])
+     check_call(['grunt', 'deploy', '--app=apiary-staging-pool1', '--force', "--branch=%s" % branch_name])
  
  def deploy_production():
      post_message("Deploying to production", "#deploy-queue")
  
      check_call(['grunt', 'deploy'])
+     check_call(['grunt', 'deploy', '--app=apiary-staging'])
  
Update deploy and stage with new environ
## Code Before:
from subprocess import check_call

from blackbelt.handle_github import get_current_branch
from blackbelt.messages import post_message


def deploy_staging():
    branch_name = get_current_branch()

    post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")

    check_call(['grunt', 'deploy', '--app=apiary-staging', '--force', "--branch=%s" % branch_name])

def deploy_production():
    post_message("Deploying to production", "#deploy-queue")

    check_call(['grunt', 'deploy'])

## Instruction:
Update deploy and stage with new environ
## Code After:
from subprocess import check_call

from blackbelt.handle_github import get_current_branch
from blackbelt.messages import post_message


def deploy_staging():
    branch_name = get_current_branch()

    post_message("Deploying branch %s to staging" % branch_name, "#deploy-queue")

    check_call(['grunt', 'deploy', '--app=apiary-staging-pool1', '--force', "--branch=%s" % branch_name])

def deploy_production():
    post_message("Deploying to production", "#deploy-queue")

    check_call(['grunt', 'deploy'])
    check_call(['grunt', 'deploy', '--app=apiary-staging'])
