From 668c700d436d8c0787f98813699aaa7c1a765590 Mon Sep 17 00:00:00 2001 From: Madhur Kulshrestha <157124712+madhurkulshrestha-hyland@users.noreply.github.com> Date: Mon, 2 Sep 2024 17:52:17 +0530 Subject: [PATCH] NXP-32731: hotfix checker (#169) (#171) Co-authored-by: Rakesh Kumar Singh <52422856+rakeshkumar1019@users.noreply.github.com> --- .github/workflows/hotfix-checker.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/hotfix-checker.yaml b/.github/workflows/hotfix-checker.yaml index 40287a75..5e8ab7c3 100644 --- a/.github/workflows/hotfix-checker.yaml +++ b/.github/workflows/hotfix-checker.yaml @@ -16,6 +16,9 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + - name: Authenticate GitHub CLI run: | @@ -26,8 +29,11 @@ jobs: id: get-branch run: | last_pr_merge_commit=$(git log --merges --pretty=format:"%H" -n 1) + echo "Last PR merge commit: $last_pr_merge_commit" merge_message=$(git log -1 --pretty=%B $last_pr_merge_commit) + echo "Merge message: $merge_message" full_branch_name=$(echo "$merge_message" | grep -oP 'from \K[^/]+/[^\s]+$') + echo "Full branch name: $full_branch_name" branch_name=$(echo "$full_branch_name" | awk -F'/' '{print $2}') echo "The branch name is $branch_name & full name is $full_branch_name" echo "::set-output name=last_pr_branch::$(echo $branch_name | xargs)"