Ejemplo n.º 1
0
def slack_get(text, channel, user_id, user_name, guid):
    try:
        slackwork = slackcreate(text, channel, user_id, user_name, guid)
        newboard = TrelloCreate()._create_event_board(name=text,guid=guid,description=None)
        url = newboard.url
        wfrom = 'slack'
        TrelloCreate()._create_event_card(name=text,guid=guid,url=url,wfrom=wfrom,description=None)
        snippet(eventid=guid,eventname=text)
    except Exception,e:
        print str(e)
Ejemplo n.º 2
0
def trello_from_trello(guid,cardid,actiontype,name,description):
    try:
        card = MyTrelloClient()._get_card(cardid)
        print 'testing if card was created by slack'
        wfrom = [x.name for x in card.labels if x.name=='FromSlack']
        if 'FromSlack' not in wfrom and actiontype == 'createCard':
            print 'creating new board'
            newboard = TrelloCreate()._create_event_board(name=name,guid=guid,description=description)
            url = newboard.url
            print 'updating card with board url'
            TrelloCreate()._update_event_card(url,card)
            print 'creating event in slack'
            slackcreate(name, None, None, None, guid)
            print 'creating event appl snippet'
            snippet(eventid=guid,eventname=name)
        else:
            pass
    except Exception,e:
        print str(e)
Ejemplo n.º 3
0
def trello_from_trello(guid, cardid, actiontype, name, description):
    try:
        card = MyTrelloClient()._get_card(cardid)
        print 'testing if card was created by slack'
        wfrom = [x.name for x in card.labels if x.name == 'FromSlack']
        if 'FromSlack' not in wfrom and actiontype == 'createCard':
            print 'creating new board'
            newboard = TrelloCreate()._create_event_board(
                name=name, guid=guid, description=description)
            url = newboard.url
            print 'updating card with board url'
            TrelloCreate()._update_event_card(url, card)
            print 'creating event in slack'
            slackcreate(name, None, None, None, guid)
            print 'creating event appl snippet'
            snippet(eventid=guid, eventname=name)
            print 'updating casanova'
            casanovaurl = os.environ['ngrok_url']
            casanovaevent = requests.get(casanovaurl + '/?eventid=' + guid +
                                         '&eventname=' + name)
        else:
            pass
    except Exception, e:
        print str(e)
Ejemplo n.º 4
0
def slack_get(text, channel, user_id, user_name, guid):
    try:
        slackwork = slackcreate(text, channel, user_id, user_name, guid)
        newboard = TrelloCreate()._create_event_board(name=text,
                                                      guid=guid,
                                                      description=None)
        url = newboard.url
        wfrom = 'slack'
        TrelloCreate()._create_event_card(name=text,
                                          guid=guid,
                                          url=url,
                                          wfrom=wfrom,
                                          description=None)
        snippet(eventid=guid, eventname=text)
    except Exception, e:
        print str(e)