You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue depends upon the issues #7 and #8 and thus can be only attempted after those issues are closed.
In this issue, you'll add a new GitHub parser class called LabelUpdateEventParser in the file bot/github/github_parsers.py. The data sent to us by GitHub for this event can be found here.
Step 1
Create LabelUpdateEventParser class.
For this step, you'll do the following:
Create a class called LabelUpdateEventParser that inherits from EventParser and implements the static methods verify_payload and cast_payload_to_event just like the other parsers in the file.
In the verify_payload method of this class, the condition should just check that event_type == "label". Nothing else is required.
In the cast_payload_to_event method, event_type, repo and user should be assigned properly according to the other parsers. Then, label should be assigned to a Label object with the name and action being set to json["label"]["name"] and json["action"], respectively.
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 LabelUpdateEventParser at the end of the list.
This issue is a part of a bigger issue (#6).
Leave a comment if you have any doubts.
The text was updated successfully, but these errors were encountered:
This issue depends upon the issues #7 and #8 and thus can be only attempted after those issues are closed.
In this issue, you'll add a new GitHub parser class called
LabelUpdateEventParser
in the filebot/github/github_parsers.py
. The data sent to us by GitHub for this event can be found here.Step 1
Create
LabelUpdateEventParser
class.For this step, you'll do the following:
LabelUpdateEventParser
that inherits fromEventParser
and implements the static methodsverify_payload
andcast_payload_to_event
just like the other parsers in the file.verify_payload
method of this class, the condition should just check thatevent_type == "label"
. Nothing else is required.cast_payload_to_event
method,event_type
,repo
anduser
should be assigned properly according to the other parsers. Then,label
should be assigned to aLabel
object with thename
andaction
being set tojson["label"]["name"]
andjson["action"]
, respectively.Step 2
Update list in
parse
methodFor this step, all you need to do is go to the list
event_parsers
inside theparse
method inside theGitHubPayloadParser
class, and then addLabelUpdateEventParser
at the end of the list.This issue is a part of a bigger issue (#6).
Leave a comment if you have any doubts.
The text was updated successfully, but these errors were encountered: