Skip to content

Commit

Permalink
first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Aug 8, 2024
1 parent ff09db1 commit e083a82
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,27 @@ jobs:
changed_files = '${{ steps.changed-files.outputs.all_changed_files }}'.split()
print("XXX", changed_files)
def format_code_review_data(data_list):
formatted_string = "Code Review Data:\n\n"
for item in data_list:
formatted_string += f"File: {item['filename']}\n"
formatted_string += "Original Content:\n"
formatted_string += "```\n"
formatted_string += item['originalContent']
formatted_string += "\n```\n\n"
formatted_string += "Patch:\n"
formatted_string += "```\n"
formatted_string += item['patch']
formatted_string += "\n```\n\n"
formatted_string += "---\n\n"
formatted_string += "End of Code Review Data"
return formatted_string
print(format_code_review_data(file_data))
try:
review_comments = { file:[(1,'cool')] for file in changed_files }
g = Github(os.environ['GITHUB_TOKEN'])
Expand Down

0 comments on commit e083a82

Please sign in to comment.