From c884b0625bec029d8e14e02859df22b3493d91e3 Mon Sep 17 00:00:00 2001 From: Dawid L Jablonski <31285735+DawidJablon@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:04:38 +0100 Subject: [PATCH] HXOR-193 in the pull-request flow, branch name in the flag parser should be managed better (#8405) * Changed a structure * Added $ * Added missing ) * [ci:force] --- .github/workflows/pull-request.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 569b55b174..8f9523d762 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -108,6 +108,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Get branch name + uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.36.0 + - name: ci:force flag parser shell: bash run: | @@ -116,7 +119,8 @@ jobs: exit 0 else git fetch --all - message=$(git log --format=%B -n 1 origin/${{ github.head_ref }}) + echo "$BRANCH_NAME" + message=$(git log --format=%B -n 1 origin/$BRANCH_NAME) echo "COMMIT_MESSAGE=$message" >> $GITHUB_ENV export COMMIT_MESSAGE=$message if [[ "$COMMIT_MESSAGE" == *"[ci:force]"* ]]; then