How to use the libmozevent.phabricator.PhabricatorActions function in libmozevent

To help you get started, we’ve selected a few libmozevent examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / code-review / events / code_review_events / workflow.py View on Github external
from code_review_events import QUEUE_PULSE_BUGBUG_TEST_SELECT
from code_review_events import QUEUE_PULSE_TRY_TASK_END
from code_review_events import QUEUE_WEB_BUILDS
from code_review_events import community_taskcluster_config
from code_review_events import taskcluster_config
from code_review_events.bugbug_utils import BugbugUtils
from code_review_tools import heroku

logger = structlog.get_logger(__name__)

PULSE_TASK_GROUP_RESOLVED = "exchange/taskcluster-queue/v1/task-group-resolved"
PULSE_TASK_COMPLETED = "exchange/taskcluster-queue/v1/task-completed"
PULSE_TASK_FAILED = "exchange/taskcluster-queue/v1/task-failed"


class CodeReview(PhabricatorActions):
    """
    Code review workflow, receiving build notifications from HarborMaster
    and pushing on Try repositories
    """

    def __init__(self, publish=False, user_blacklist=[], *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.publish = publish
        logger.info(
            "Phabricator publication is {}".format(
                self.publish and "enabled" or "disabled"
            )
        )

        # Load the blacklisted users
        if user_blacklist: