Skip to content

Commit

Permalink
Remove for loop from git commit message
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Byrgazov <[email protected]>
  • Loading branch information
Vladislav Byrgazov committed Nov 26, 2024
1 parent 87ad3af commit c29b54e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/update-dependent-repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
echo "PR link: https://github.com/${{ github.repository }}/pull/${{ steps.findPr.outputs.pr }}" >> /tmp/commit-message
echo "" >> /tmp/commit-message
LOG_MSG=$(git log --date=iso --pretty='format:Commit: %h%nAuthor: %an%nDate: %ad%nMessage:%n - %B%n' -1 | sed '/^$/d;$d')
for((i=2;i<=18;i+=2)); do n=$(printf '%*s' $((i+2))) m=$(printf '%*s' $i) LOG_MSG=$(echo "$LOG_MSG" | tr '\n' '|' | sed "s/${m}-/${n}-/2g" | tr '|' '\n'); done
LOG_MSG=$(echo "$LOG_MSG" | tr '\n' '|' | sed "s/ -/ -/2g" | tr '|' '\n')
echo "$LOG_MSG" >> /tmp/commit-message
echo "Commit Message:"
cat /tmp/commit-message
Expand Down

0 comments on commit c29b54e

Please sign in to comment.