Source code for muffineer.models.bitbucket
import salt.client
[docs]class BitbucketEvent(object):
def __init__(self, data):
self.tag = '/bitbucket/event'
self.data = data
self.caller = salt.client.Caller()
[docs] def send(self):
self.caller.cmd('event.send', self.tag, self.data)
[docs]class PushEvent(BitbucketEvent):
def __init__(self, data):
BitbucketEvent.__init__(self, data)
self.tag = '/bitbucket/event/push'
[docs]class ModifiedEvent(BitbucketEvent):
def __init__(self, data):
BitbucketEvent.__init__(self, data)
self.tag = '/bitbucket/event/modified'
[docs]class PullrequestEvent(BitbucketEvent):
def __init__(self, data):
BitbucketEvent.__init__(self, data)
self.tag = '/bitbucket/event/pullrequest'