Skip to content

Commit

Permalink
NXP-32731: hotfix checker (#169) (#171)
Browse files Browse the repository at this point in the history
Co-authored-by: Rakesh Kumar  Singh <52422856+rakeshkumar1019@users.noreply.github.com>
  • Loading branch information
1 parent 74e49a0 commit 668c700
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/hotfix-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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)"
Expand Down

0 comments on commit 668c700

Please sign in to comment.