Skip to content

Commit

Permalink
feat: add post merge script
Browse files Browse the repository at this point in the history
Signed-off-by: hxtree <[email protected]>
  • Loading branch information
hxtree committed Nov 7, 2023
1 parent 6b7e16f commit 8bc4f26
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions common/git-hooks/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Check if the merge was successful
if [ "$1" -eq 0 ]; then
# Iterate through the new commits
for commit in $(git log HEAD@{1}..HEAD --oneline | cut -d ' ' -f 1); do
# Get the commit hash and message
commit_msg=$(git log --format=%B -n 1 $commit)

# Print the commit hash and message
echo "$commit $commit_msg"
done
fi

0 comments on commit 8bc4f26

Please sign in to comment.