Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new elif clause to compose_message for WIKI_UPDATED event. #5

Open
Tracked by #1
BURG3R5 opened this issue Oct 6, 2022 · 0 comments
Open
Tracked by #1

Add new elif clause to compose_message for WIKI_UPDATED event. #5

BURG3R5 opened this issue Oct 6, 2022 · 0 comments
Labels
MEDIUM open-source-odyssey Issues for Open Source Odyssey participants

Comments

@BURG3R5
Copy link
Member

BURG3R5 commented Oct 6, 2022

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:

  1. If len(event.wiki_pages) is equal to 1, the message should be "USER added/update the Wiki page PAGE", where USER should be event.user and PAGE should be event.wiki_pages[0].
  2. Else, the message should be "USER added/updated NUMBER Wiki pages." where USER should be event.user and NUMBER should be len(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.

@BURG3R5 BURG3R5 mentioned this issue Oct 6, 2022
4 tasks
@BURG3R5 BURG3R5 added EASY MEDIUM open-source-odyssey Issues for Open Source Odyssey participants and removed EASY labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MEDIUM open-source-odyssey Issues for Open Source Odyssey participants
Projects
None yet
Development

No branches or pull requests

1 participant