Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

UX = 'ux'
SE = 'se'
CT = 'ct'

channel_map = ChannelMap(slack_conn=client)

Expand All @@ -28,7 +29,10 @@
("ux-6-remote", "ux-triage-uxd", UX),
("ux-6-indy", "ux-triage-uxd", UX),
("ux-4-indy", "ux-triage-uie", UX),
("ux-4-remote", "ux-triage-uie", UX)
("ux-4-remote", "ux-triage-uie", UX),
("amazon-block1-march2020", "amazon-triage", CT),
("amazon-block2-march2020", "amazon-triage", CT),

]
for channel in channels:
channel_map.add_channel(
Expand All @@ -44,7 +48,8 @@
'spinning',
'party-parrot',
'heykirbyhey',
'capemario'
'capemario',
'brule-wink'
]
# *********************************************
# DO NOT EDIT BEYOND THIS POINT
Expand Down
10 changes: 10 additions & 0 deletions quackers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
ux_instructors = Airtable(os.environ.get('UX_AIRTABLE_BASE_ID'), 'Instructors')
ux_questions = Airtable(os.environ.get('UX_AIRTABLE_BASE_ID'), 'Quackers Questions')

ct_students = Airtable(os.environ.get('CT_AIRTABLE_BASE_ID'), 'Students')
ct_instructors = Airtable(os.environ.get('CT_AIRTABLE_BASE_ID'), 'Instructors')
ct_questions = Airtable(os.environ.get('CT_AIRTABLE_BASE_ID'), 'Quackers Questions')

logger = logging.getLogger('gunicorn.error')


Expand Down Expand Up @@ -84,6 +88,12 @@ def post_to_airtable(user_id, slack_username, channel, channel_map, question, in
{'table': ux_students, 'is_student': True},
{'table': ux_instructors, 'is_student': False},
]
elif base == "ct":
airtable_target = ct_questions
search_options = [
{'table': ct_students, 'is_student': True},
{'table': ct_instructors, 'is_student': False},
]
else:
raise Exception(f"No search options found for Airtable base {base}")

Expand Down