-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support pull-from-upstream for non-git upstreams (#2498)
Support pull-from-upstream for non-git upstreams Fixes #2203 TODO: dashboard followup RELEASE NOTES BEGIN pull-from-upstream is now supported also without specifying upstream_project_url in the configuration. For such cases, the upstream repository will not be detected and cloned during release syncing. RELEASE NOTES END Reviewed-by: Maja Massarini Reviewed-by: Nikola Forró
- Loading branch information
Showing
16 changed files
with
714 additions
and
48 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
alembic/versions/b43ff6137622_add_anitya_related_models.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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
"""Add Anitya related models | ||
Revision ID: b43ff6137622 | ||
Revises: 64a51b961c28 | ||
Create Date: 2024-08-01 10:37:55.286362 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "b43ff6137622" | ||
down_revision = "64a51b961c28" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"anitya_projects", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("project_id", sa.Integer(), nullable=True), | ||
sa.Column("project_name", sa.String(), nullable=True), | ||
sa.Column("package", sa.String(), nullable=True), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index( | ||
op.f("ix_anitya_projects_project_id"), | ||
"anitya_projects", | ||
["project_id"], | ||
unique=False, | ||
) | ||
op.create_table( | ||
"anitya_versions", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("version", sa.String(), nullable=True), | ||
sa.Column("project_id", sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint( | ||
["project_id"], | ||
["anitya_projects.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_index( | ||
op.f("ix_anitya_versions_project_id"), | ||
"anitya_versions", | ||
["project_id"], | ||
unique=False, | ||
) | ||
# add the event type | ||
op.execute("ALTER TYPE projecteventtype ADD VALUE 'anitya_version'") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("ix_anitya_versions_project_id"), table_name="anitya_versions") | ||
op.drop_table("anitya_versions") | ||
op.drop_index(op.f("ix_anitya_projects_project_id"), table_name="anitya_projects") | ||
op.drop_table("anitya_projects") | ||
# ### 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.