forked from BURG3R5/github-slack-bot
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
MEDIUMopen-source-odysseyIssues for Open Source Odyssey participantsIssues for Open Source Odyssey participants
Description
This issue depends upon the issues #2 and #3 and thus can be only attempted after those issues are closed.
In this issue, you'll add an elif clause to the compose_message function of the Messenger class present in the file bot/slack/messenger.py
The elif clause will check if the event.type is equal to EventType.WIKI_UPDATED. If that is true, there should be two cases:
- If
len(event.wiki_pages)is equal to1, the message should be"USER added/update the Wiki page PAGE", where USER should beevent.userand PAGE should beevent.wiki_pages[0]. - Else, the message should be
"USER added/updated NUMBER Wiki pages."where USER should beevent.userand NUMBER should belen(event.wiki_pages).
You should use f-strings as seen in other clauses already present in the function.
This issue is a part of a bigger issue (#1).
Leave a comment if you have any doubts.
Metadata
Metadata
Assignees
Labels
MEDIUMopen-source-odysseyIssues for Open Source Odyssey participantsIssues for Open Source Odyssey participants