Skip to content

Commit

Permalink
get commit message from github event
Browse files Browse the repository at this point in the history
--test-connector=source-postgres
  • Loading branch information
aaronsteers committed Sep 26, 2023
1 parent 8812193 commit 73ef9c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/airbyte-ci-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down

0 comments on commit 73ef9c2

Please sign in to comment.