From 764e010ee4283db9ed5d0092f0f5b6c86bbd4bc9 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Wed, 1 Nov 2023 14:48:58 +0500 Subject: [PATCH] build: capturing new migrations. --- .github/workflows/capture_new_migrations.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/capture_new_migrations.yml b/.github/workflows/capture_new_migrations.yml index 39f6bcd4c097..25b0c93ea3dc 100644 --- a/.github/workflows/capture_new_migrations.yml +++ b/.github/workflows/capture_new_migrations.yml @@ -172,21 +172,14 @@ jobs: - name: Process Data run: | - number2=${{ env.SECOND_QUERY }} - number1=${{ env.FIRST_QUERY }} - - if [ $number2 -gt $number1 ]; then - diff=$((number2 - number1)) - data=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select name from django_migrations ORDER by -id limit $diff;" edxapp;) - echo "$data" > cleaned_data.txt - elif [ $number1 -gt $number2 ]; then - echo "Your PR removed some migrations" > cleaned_data.txt - fi + number1=${{ env.SECOND_QUERY }} + number2=${{ env.FIRST_QUERY }} + diff=$((number1 - number2)) + data=$(mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select name from django_migrations ORDER by -id limit $diff;" edxapp;) + echo "$data" > cleaned_data.txt shell: bash - name: Comment PR - number2=${{ env.SECOND_QUERY }} - number1=${{ env.FIRST_QUERY }} uses: thollander/actions-comment-pull-request@v2 with: filePath: cleaned_data.txt