# Path: neckbeard/actions/contrib_hooks.py
# def _get_git_repo(path='.'):
#     if git is None:
#         raise ImportError('This check requires GitPython to be installed.')
# 
#     try:
#         repo = git.Repo(path)
#     except git.InvalidGitRepositoryError:
#         logger.critical('Not in a git repository.')
#         exit(1)
#     return repo
# 
# def _announce_deployment():
#     newrelic_conf = env._deployment_confs['conf'].get('newrelic', {})
#     if newrelic_conf.get('announce_deploy', False):
#         _send_deployment_end_newrelic()


import logging
from fabric.api import task, require
from neckbeard.actions.contrib_hooks import (
    _get_git_repo,
    _announce_deployment,
)



logger = logging.getLogger('actions.announce')


@task
def announce():
    require('_deployment_name')
    require('_deployment_confs')

# Path: neckbeard/actions/contrib_hooks.py
# def _get_git_repo(path='.'):
#     if git is None:
#         raise ImportError('This check requires GitPython to be installed.')
# 
#     try:
#         repo = git.Repo(path)
#     except git.InvalidGitRepositoryError:
#         logger.critical('Not in a git repository.')
#         exit(1)
#     return repo
# 
# def _announce_deployment():
#     newrelic_conf = env._deployment_confs['conf'].get('newrelic', {})
#     if newrelic_conf.get('announce_deploy', False):
#         _send_deployment_end_newrelic()


# Path: neckbeard/actions/announce.py
import logging
from fabric.api import task, require
from neckbeard.actions.contrib_hooks import (
    _get_git_repo,
    _announce_deployment,
)




logger = logging.getLogger('actions.announce')


@task
def announce():
    require('_deployment_name')
    require('_deployment_confs')

    require('_active_gen')