Skip to content

Commit

Permalink
Preserve text after the ticket name in the migration comment
Browse files Browse the repository at this point in the history
Instead of generating a migration comment like "dm_12345" on a branch
like "DM-12345-do-something", preserve the text after the ticket name
so that the script name will look like "dm_12345_do_something". The
extra text can be used as a short indication of what the migration
script is doing.
  • Loading branch information
JeremyMcCormick committed Nov 26, 2024
1 parent 794e45d commit 111bb29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/migrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ jobs:
run: |
export SDM_SCHEMAS_DIR=${{ github.workspace }}/sdm_schemas
echo "SDM_SCHEMAS_DIR=$SDM_SCHEMAS_DIR"
python alembic-autogenerate.py ${{ env.TICKET_NAME }}
MIGRATION_COMMENT=$(echo ${{ env.BRANCH_NAME }} | sed -E 's/^tickets\///')
python alembic-autogenerate.py $MIGRATION_COMMENT
if git diff --quiet; then
echo "No changes detected."
exit 0
Expand Down

0 comments on commit 111bb29

Please sign in to comment.