Skip to content

Commit 08488f0

Browse files
authored
test(github): Add unittests for github_parsers.
Fixes #67.
2 parents a8e5b9f + 2ab22b0 commit 08488f0

File tree

3 files changed

+493
-2
lines changed

3 files changed

+493
-2
lines changed

bot/github/github_parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def cast_payload_to_event(event_type: str, json: JSON) -> GitHubEvent:
488488
link=json["pull_request"]["html_url"],
489489
),
490490
comments=[json["comment"]["body"]],
491-
links=[Link(url=json["comment"]["url"])],
491+
links=[Link(url=json["comment"]["html_url"])],
492492
)
493493

494494

bot/models/github/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, event_type: EventType, repo: Repository, **kwargs):
5959
if "links" in kwargs:
6060
self.links = kwargs["links"]
6161
if "reviewers" in kwargs:
62-
self.comments = kwargs["reviewers"]
62+
self.reviewers = kwargs["reviewers"]
6363

6464
def __str__(self):
6565
string = ""

0 commit comments

Comments
 (0)