mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
fixed slight issue with naming of variables
This commit is contained in:
@ -184,16 +184,16 @@ def get_files(pr: PullRequest, repo: Repository, repo_path: str) -> dict[str, Fi
|
|||||||
def get_comments(pr: PullRequest) -> list[Comment]:
|
def get_comments(pr: PullRequest) -> list[Comment]:
|
||||||
ret = []
|
ret = []
|
||||||
for comment in pr.get_review_comments():
|
for comment in pr.get_review_comments():
|
||||||
comment = Comment(
|
comment_to_add = Comment(
|
||||||
body=comment.body,
|
body=comment.body,
|
||||||
file=comment.path,
|
file=comment.path,
|
||||||
from_=comment.start_line if comment.start_line else comment.line,
|
from_=comment.start_line if comment.start_line else comment.line,
|
||||||
to=comment.line,
|
to=comment.line,
|
||||||
)
|
)
|
||||||
if comment.from_ is None or comment.to is None:
|
if comment_to_add.from_ is None or comment_to_add.to is None:
|
||||||
comment.to = comment.original_line
|
comment_to_add.to = comment.original_line
|
||||||
comment.from_ = comment.original_start_line
|
comment_to_add.from_ = comment.original_start_line
|
||||||
ret.append(comment)
|
ret.append(comment_to_add)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user