mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Maybe better merge subject
And hopefully don't delete branch
This commit is contained in:
parent
d44e12e91c
commit
169e75fabf
1 changed files with 9 additions and 1 deletions
10
.github/workflows/i18n-automerge.yml
vendored
10
.github/workflows/i18n-automerge.yml
vendored
|
@ -56,8 +56,16 @@ jobs:
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "More than 50 lines have been changed. Merging pull request."
|
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 }})
|
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
|
fi
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue