Skip to content

Commit

Permalink
Merge pull request #12 from feiskyer/format-markdown
Browse files Browse the repository at this point in the history
chore: format markdown
  • Loading branch information
feiskyer authored Nov 3, 2023
2 parents ab02ca4 + 696faa7 commit 5ce4659
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:
|review_per_file|Send out review requests per file|false|Large changes would be reviewed per file automatically|
|comment_per_file|Post review comments per file|false|True


## Samples

The ChatGPT reviewer PRs are also getting reviewed by ChatGPT, refer the [pull requests](https://github.com/feiskyer/ChatGPT-Reviewer/pulls?q=is%3Apr) for the sample review comments.
Expand Down
6 changes: 4 additions & 2 deletions app/githubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
#
import os
import re
import requests
from github import Github

Expand Down Expand Up @@ -110,10 +111,11 @@ def review_pr(self, payload):
if self.comment_per_file:
# Create a review comment on the file
reviewComments = f'''@{pr.user.login} Thanks for your contributions!\n\n{completion}'''
line_no = re.search('\@\@ \-(\d+),', file.patch).group(1)
pr.create_review_comment(body=reviewComments,
commit_id=list(pr.get_commits())[-1],
commit=list(pr.get_commits())[-1],
path=file.filename,
position=1)
line=int(line_no))
else:
reviews = reviews + \
[f"**Here are review comments for file {file.filename}:**\n{completion}\n\n"]
Expand Down
2 changes: 1 addition & 1 deletion app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
backoff>=2.2.1
openai>=0.27.0
tiktoken>=0.2.0
PyGithub>=1.57
PyGithub>=2.1.1
argparse>=1.4.0

0 comments on commit 5ce4659

Please sign in to comment.