-
Couldn't load subscription status.
- Fork 1
Fix import paths and CodegenApp initialization in examples #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: develop
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,7 +1,7 @@ | ||
| import logging | ||
| from logging import getLogger | ||
| import modal | ||
| from codegen.extensions.events.app import CodegenApp | ||
| from codegen.extensions.events.codegen_app import CodegenApp | ||
| from fastapi import Request | ||
| from codegen.extensions.github.types.events.pull_request import PullRequestLabeledEvent, PullRequestUnlabeledEvent | ||
| from helpers import remove_bot_comments, pr_review_agent | ||
|
Comment on lines
1
to
7
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. Redundant ImportsThe module Recommendation: |
||
|
|
@@ -26,7 +26,7 @@ | |
| ) | ||
| ) | ||
|
|
||
| app = CodegenApp(name="github", image=base_image, modal_api_key="") | ||
| app = CodegenApp(name="github") | ||
|
|
||
|
|
||
| @app.github.event("pull_request:labeled") | ||
|
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. Event Handler RobustnessThe event handler Recommendation: |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| from codegen import Codebase, CodeAgent | ||
| from codegen.extensions.clients.linear import LinearClient | ||
| from codegen.extensions.events.app import CodegenApp | ||
| from codegen.extensions.events.codegen_app import CodegenApp | ||
| from codegen.extensions.tools.github.create_pr import create_pr | ||
| from codegen.shared.enums.programming_language import ProgrammingLanguage | ||
| from helpers import create_codebase, format_linear_message, has_codegen_label, process_update_event | ||
|
|
@@ -17,7 +17,7 @@ | |
|
|
||
| image = modal.Image.debian_slim(python_version="3.13").apt_install("git").pip_install("fastapi[standard]", "codegen==v0.26.3") | ||
|
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. Potential Security and Compatibility Issue with Docker Image SetupThe Docker image is being configured with a specific Python version (
Recommendation:
|
||
|
|
||
| app = CodegenApp("linear-bot", image=image, modal_api_key="") | ||
| app = CodegenApp("linear-bot") | ||
|
|
||
|
|
||
| @app.cls(secrets=[modal.Secret.from_dotenv()], keep_warm=1) | ||
|
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. Security Concern with Handling SecretsThe Recommendation:
|
||
|
|
||
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.
The use of a specific Python version (
python_version="3.13") and package versions inpip_installcould lead to maintenance challenges or performance issues if these versions are deprecated or have known vulnerabilities. It is recommended to allow for more flexibility in versioning or to ensure regular updates and checks for the dependencies to mitigate potential security risks and maintain compatibility.