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 b175877 commit 7e7a8c0
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/code_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,21 @@ jobs:
"originalContent": original_content,
"changedContent": changed_content
})
print(file_data)
try:
response = requests.post(
os.environ['REVIEW_API_URL'],
json={"files": file_data},
headers={
'Authorization': f"Bearer {os.environ['REVIEW_API_KEY']}",
'Content-Type': 'application/json'
}
)
response.raise_for_status()
review_comments = response.json()
# response = requests.post(
# os.environ['REVIEW_API_URL'],
# json={"files": file_data},
# headers={
# 'Authorization': f"Bearer {os.environ['REVIEW_API_KEY']}",
# 'Content-Type': 'application/json'
# }
# )
# response.raise_for_status()
# review_comments = response.json()

review_comments = { file:[(1,'cool')] for file in changed_files }
g = Github(os.environ['GITHUB_TOKEN'])
repo = g.get_repo(os.environ['GITHUB_REPOSITORY'])
pr = repo.get_pull(int(os.environ['PR_NUMBER']))
Expand Down

0 comments on commit 7e7a8c0

Please sign in to comment.