-
Notifications
You must be signed in to change notification settings - Fork 1
made some changes #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| from fastapi import FastAPI, Header | ||
| from fastapi.middleware.cors import CORSMiddleware | ||
| import os | ||
| import logging | ||
| import requests | ||
|
Comment on lines
1
to
4
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed CORSMiddleware import; if the API will be called from browsers, re‑add the import to avoid CORS issues. |
||
|
|
@@ -10,7 +9,6 @@ | |
|
|
||
| load_dotenv() | ||
| app = FastAPI() | ||
| app.add_middleware(CORSMiddleware) | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
| logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s") | ||
|
Comment on lines
9
to
14
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed app.add_middleware(CORSMiddleware); consider restoring the middleware when cross‑origin requests are needed. |
||
|
|
@@ -24,16 +22,7 @@ def main(): | |
| return {"msg": "Hello from code reviewer server"} | ||
|
|
||
|
|
||
| """ | ||
| Webhook Abstract Response object for pull requests | ||
| { | ||
| "action": "", | ||
| "number": "", | ||
| "pull_request": {}, | ||
| "repository": {}, | ||
| "sender": {} | ||
| } | ||
| """ | ||
|
|
||
| headers = { | ||
| "Authorization": f"Bearer {github_token}", | ||
| "X-GitHub-Api-Version": "2022-11-28", | ||
|
Comment on lines
22
to
28
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deleted the webhook abstract comment; replace it with a proper module‑level docstring to retain documentation. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line before the new ## Features heading for consistency and ensure the bullet list follows markdown style.