Skip to content

Commit

Permalink
Attempt to fix bug in create_inline_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zmeir authored Aug 7, 2023
1 parent b1148e5 commit 164ed77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pr_agent/git_providers/github_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def publish_inline_comment(self, body: str, relevant_file: str, relevant_line_in


def create_inline_comment(self, body: str, relevant_file: str, relevant_line_in_file: str):
position = find_line_number_of_relevant_line_in_file(self.diff_files, relevant_file.strip('`'), relevant_line_in_file)
position, absolute_position = find_line_number_of_relevant_line_in_file(self.diff_files, relevant_file.strip('`'), relevant_line_in_file)
if position == -1:
if get_settings().config.verbosity_level >= 2:
logging.info(f"Could not find position for {relevant_file} {relevant_line_in_file}")
Expand Down Expand Up @@ -410,4 +410,4 @@ def generate_link_to_relevant_line_number(self, suggestion) -> str:
if get_settings().config.verbosity_level >= 2:
logging.info(f"Failed adding line link, error: {e}")

return ""
return ""

0 comments on commit 164ed77

Please sign in to comment.