From 73ef9c295510e7157175d7466a414c7c806234aa Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Tue, 26 Sep 2023 13:44:52 -0700 Subject: [PATCH] get commit message from github event --test-connector=source-postgres --- .github/workflows/airbyte-ci-command.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/airbyte-ci-command.yml b/.github/workflows/airbyte-ci-command.yml index 4bd7b8271867..c4751b681a03 100644 --- a/.github/workflows/airbyte-ci-command.yml +++ b/.github/workflows/airbyte-ci-command.yml @@ -57,6 +57,7 @@ env: CONNECTOR_NAME: "${{ github.event.inputs.name }}" CMD: ${{ github.event.inputs.cmd || 'test' }} CMD_ARGS: ${{ github.event.inputs.args || '' }} + COMMIT_MSG: ${{ github.event.head_commit.message || '' }} jobs: @@ -74,11 +75,10 @@ jobs: - name: Check commit message id: check-commit run: | - commit_message=$(git log --format=%B -n 1 ${{ github.event.after }}) - echo "Commit message is: $commit_message" + echo "Commit message is: $COMMIT_MSG" # Use regex to find the desired pattern - if [[ ! $commit_message =~ --test-connector=([a-zA-Z0-9_-]+) ]]; then + if [[ ! $COMMIT_MSG =~ --test-connector=([a-zA-Z0-9_-]+) ]]; then echo "Commit message doesn't contain retest pattern. Aborting." exit 1 fi