diff --git a/action.yml b/action.yml index 681de7b..11a4f9b 100644 --- a/action.yml +++ b/action.yml @@ -2,7 +2,6 @@ name: 'GPTReviewWorkflow' description: 'Let AI review your code' branding: icon: 'eye' - color: 'gray-dark' inputs: OPENAI_API_KEY: description: 'OpenAI API Key' diff --git a/review.py b/review.py index 8de403c..bbdd426 100644 --- a/review.py +++ b/review.py @@ -39,7 +39,7 @@ def get_review(): top_p=1.0, frequency_penalty=0.0, presence_penalty=0.0 - ) + ) #this si bad review = response['choices'][0]['text'] data = {"body": review, "commit_id": GIT_COMMIT_HASH, "event": "COMMENT"} @@ -52,8 +52,8 @@ def get_review(): PR_NUMBER = pr_link.split("/")[-1] # https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/reviews - response = requests.post(f'https://api.github.com/repos/{OWNER}/{REPO}/pulls/{PR_NUMBER}/reviews', headers=headers, data=data) - print(response.json()) + response = requests(f'https://api.github.com/repos/{OWNER}/{REPO}/pulls/{PR_NUMBER}/reviews', headers=headers, data=data) + print(response.jso()) if __name__ == "__main__":