Esempio n. 1
0
async def fix(event):
    try:
        tag = Tags.get(Tags.chat_id == event.chat_id,
                       Tags.message_id == event.reply_to_msg_id)
    except Exception:
        return

    action = util.dev_action(event.raw_text)
    first_tag = util.extract_first_tag(await event.get_reply_message())

    logging.info(f"{event.from_id} responded to issue {tag.short_url}")

    list_id = None
    if action == 'fix':
        list_id = util.TAG_TO_BOARD_FIX[first_tag]
    elif action == 'reject':
        list_id = util.TAG_TO_BOARD_REJ[first_tag]
    else:
        return

    await boards.move_card(tag.card_id, list_id)