diff --git a/action.yml b/action.yml index 7ae64e6..f9cfc9b 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,5 @@ name: 'GPTReviewWorkflow' description: 'Let AI review your code' -icon: 'eye' -color: 'gray-dark' inputs: OPENAI_API_KEY: description: 'OpenAI API Key' diff --git a/review.py b/review.py index 2d0508f..0a145fc 100644 --- a/review.py +++ b/review.py @@ -44,15 +44,15 @@ def get_review(): data = {"body": review, "commit_id": GIT_COMMIT_HASH, "event": "COMMENT"} data = json.dumps(data) print(f"Response from OpenAI: {data}") - +#comment wiht typos ni it OWNER = pr_link.split("/")[-4] REPO = pr_link.split("/")[-3] 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.josn()) if __name__ == "__main__":