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 a new GitHub parser class called WikiUpdateEventParser in the file bot/github/github_parsers.py. The data sent to us by GitHub for this event can be found here. The event is called "gollum" but it is the wiki update event we're looking for.
Step 1
Create WikiUpdateEventParser class.
For this step, you'll do the following:
- Create a class called
WikiUpdateEventParserthat inherits fromEventParserand implements the static methodsverify_payloadandcast_payload_to_eventjust like the other parsers in the file. - In the
verify_payloadmethod of this class, the condition should just check thatevent_type == "gollum". Nothing else is required. - In the
cast_payload_to_eventmethod,event_type,repoandusershould be assigned properly according to the other parsers. Then,wiki_pagesshould be assigned to a list ofWikiPageobjects made up from data insidejson["pages"]. Confirm the exact details from the documentation link given above.
Step 2
Update list in parse method
For this step, all you need to do is go to the list event_parsers inside the parse method inside the GitHubPayloadParser class, and then add WikiUpdateEventParser at the end of the list.
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