-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update pre-commit to auto-fix linting #271
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ RESEND_API_KEY= | |
ANTHROPIC_API_KEY= | ||
POSTHOG_API_KEY= | ||
POSTHOG_HOST= | ||
FIRECRAWL_API_KEY= | ||
FIRECRAWL_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Generic single-database configuration. | ||
Generic single-database configuration. |
49 changes: 27 additions & 22 deletions
49
app/alembic/versions/20241020111943_262d870e9686_custom_agents.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
"""custom_agents | ||
|
||
Revision ID: 20241020111943_262d870e9686 | ||
Revises: | ||
Revises: | ||
Create Date: 2024-10-20 11:19:43.653649 | ||
|
||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '20241020111943_262d870e9686' | ||
revision: str = "20241020111943_262d870e9686" | ||
down_revision: Union[str, None] = None | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
# Add this line | ||
branch_labels = ('custom_agents_microservice',) | ||
branch_labels = ("custom_agents_microservice",) | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('custom_agents', | ||
sa.Column('id', sa.String(), nullable=False), | ||
sa.Column('user_id', sa.String(), nullable=True), | ||
sa.Column('role', sa.String(), nullable=True), | ||
sa.Column('goal', sa.String(), nullable=True), | ||
sa.Column('backstory', sa.String(), nullable=True), | ||
sa.Column('system_prompt', sa.String(), nullable=True), | ||
sa.Column('tasks', postgresql.JSONB(astext_type=sa.Text()), nullable=True), | ||
sa.Column('deployment_url', sa.String(), nullable=True), | ||
sa.Column('deployment_status', sa.String(), nullable=False), | ||
sa.Column('created_at', sa.DateTime(), nullable=False), | ||
sa.Column('updated_at', sa.DateTime(), nullable=False), | ||
sa.PrimaryKeyConstraint('id') | ||
op.create_table( | ||
"custom_agents", | ||
sa.Column("id", sa.String(), nullable=False), | ||
sa.Column("user_id", sa.String(), nullable=True), | ||
sa.Column("role", sa.String(), nullable=True), | ||
sa.Column("goal", sa.String(), nullable=True), | ||
sa.Column("backstory", sa.String(), nullable=True), | ||
sa.Column("system_prompt", sa.String(), nullable=True), | ||
sa.Column("tasks", postgresql.JSONB(astext_type=sa.Text()), nullable=True), | ||
sa.Column("deployment_url", sa.String(), nullable=True), | ||
sa.Column("deployment_status", sa.String(), nullable=False), | ||
sa.Column("created_at", sa.DateTime(), nullable=False), | ||
sa.Column("updated_at", sa.DateTime(), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index(op.f("ix_custom_agents_id"), "custom_agents", ["id"], unique=False) | ||
op.create_index( | ||
op.f("ix_custom_agents_user_id"), "custom_agents", ["user_id"], unique=False | ||
) | ||
op.create_index(op.f('ix_custom_agents_id'), 'custom_agents', ['id'], unique=False) | ||
op.create_index(op.f('ix_custom_agents_user_id'), 'custom_agents', ['user_id'], unique=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_custom_agents_user_id'), table_name='custom_agents') | ||
op.drop_index(op.f('ix_custom_agents_id'), table_name='custom_agents') | ||
op.drop_table('custom_agents') | ||
op.drop_index(op.f("ix_custom_agents_user_id"), table_name="custom_agents") | ||
op.drop_index(op.f("ix_custom_agents_id"), table_name="custom_agents") | ||
op.drop_table("custom_agents") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🛠️ Refactor suggestion
Shell Script Improvements in Commit Step
There are a couple of shell-related improvements to enhance reliability and security:
$(...)
syntax for command substitution.${{ github.head_ref }}
directly—which may pose security concerns—pass it via an environment variable. For example, define an env var likeGITHUB_HEAD_REF: ${{ github.head_ref }}
and reference it in your script.A suggested diff for the inline script:
Please adjust the inline script accordingly.
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.4)
30-30: shellcheck reported issue in this script: SC2006:style:1:7: Use $(...) notation instead of legacy backticks
...
(shellcheck)
30-30: "github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)