Skip to content

Commit

Permalink
Maybe better merge subject
Browse files Browse the repository at this point in the history
And hopefully don't delete branch
  • Loading branch information
cheeaun committed Sep 2, 2024
1 parent d44e12e commit 169e75f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/i18n-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ jobs:
exit 0
else
echo "More than 50 lines have been changed. Merging pull request."
# List of locales changed
LOCALES_CHANGED=$(git diff --name-only $BASE_SHA $HEAD_SHA | grep '\.po$' | awk -F '/' '{print $NF}' | sed 's/\.po$//' | tr '\n' ',' | sed 's/,$//')
# Better subject
# "i18n updates ([LOCALES_CHANGED])"
SUBJECT="i18n updates ($LOCALES_CHANGED)"
PR_NUMBER=$(echo ${{ github.event.pull_request.number }})
gh pr merge $PR_NUMBER --auto --squash || true
gh pr merge $PR_NUMBER --squash --subject "$SUBJECT" || true
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 169e75f

Please sign in to comment.