Skip to content

Commit

Permalink
test(github): Add unittests for github_parsers.
Browse files Browse the repository at this point in the history
Fixes #67.
  • Loading branch information
BURG3R5 authored Aug 15, 2022
2 parents a8e5b9f + 2ab22b0 commit 08488f0
Show file tree
Hide file tree
Showing 3 changed files with 493 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot/github/github_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def cast_payload_to_event(event_type: str, json: JSON) -> GitHubEvent:
link=json["pull_request"]["html_url"],
),
comments=[json["comment"]["body"]],
links=[Link(url=json["comment"]["url"])],
links=[Link(url=json["comment"]["html_url"])],
)


Expand Down
2 changes: 1 addition & 1 deletion bot/models/github/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, event_type: EventType, repo: Repository, **kwargs):
if "links" in kwargs:
self.links = kwargs["links"]
if "reviewers" in kwargs:
self.comments = kwargs["reviewers"]
self.reviewers = kwargs["reviewers"]

def __str__(self):
string = ""
Expand Down
Loading

0 comments on commit 08488f0

Please sign in to comment.