In this issue, you'll add a new model class WikiPage and a new member wiki_pages to the GitHubEvent class.
Step 1
Create new model class
For this step, you'll add a new model class WikiPage in the folder bot/models/github/
First you'll create a new file in the folder, and name it wiki_page.py
Inside that file, you'll create a class called WikiPage. This class will have three members: name, action and link. All three variables will be of the type str. You can refer to the Repository model for guidance.
Step 2
Update GitHubEvent model
For this step, you'll add a member to the GitHubEvent model present in the file bot/models/github/event.py
First you'll add a line below the line reviewers: Optional[list[User]] that declares a variable wiki_pages with type Optional[list[WikiPage].
Next you'll add an if statement below the line self.reviewers = kwargs["reviewers"] that confirms if there is a key "wiki_pages" in the dictionary kwargs. If that is true, then you should assign kwargs["wiki_pages"] to self.wiki_pages.
This issue is a part of a bigger issue (#1).
Leave a comment if you have any doubts.
In this issue, you'll add a new model class
WikiPageand a new memberwiki_pagesto theGitHubEventclass.Step 1
Create new model class
For this step, you'll add a new model class
WikiPagein the folderbot/models/github/First you'll create a new file in the folder, and name it
wiki_page.pyInside that file, you'll create a
classcalledWikiPage. This class will have three members:name,actionandlink. All three variables will be of the typestr. You can refer to theRepositorymodel for guidance.Step 2
Update
GitHubEventmodelFor this step, you'll add a member to the
GitHubEventmodel present in the filebot/models/github/event.pyFirst you'll add a line below the line
reviewers: Optional[list[User]]that declares a variablewiki_pageswith typeOptional[list[WikiPage].Next you'll add an
ifstatement below the lineself.reviewers = kwargs["reviewers"]that confirms if there is a key"wiki_pages"in the dictionarykwargs. If that is true, then you should assignkwargs["wiki_pages"]toself.wiki_pages.This issue is a part of a bigger issue (#1).
Leave a comment if you have any doubts.