File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,23 @@ jobs:
183183
184184 ls -1 /tmp/repo/versions > /tmp/repo/versions.txt
185185
186+ COMMIT_MESSAGE=$(git show-branch --no-name origin/${CIRCLE_BRANCH})
187+ GITMOJI=$(echo $COMMIT_MESSAGE | awk -F ':' '{print $2}')
188+ if [ "$GITMOJI" ]
189+ then
190+ GITMOJI_CODEPOINT=$( \
191+ curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/emojis | \
192+ jq -r ".${GITMOJI}" | \
193+ awk -F 'https://github.githubassets.com/images/icons/emoji/unicode/|.png.*' '{print $2}' \
194+ )
195+ if [ "$GITMOJI_CODEPOINT" ]
196+ then
197+ GITMOJI_UNICODE="$(echo -e \\u$GITMOJI_CODEPOINT) "
198+ COMMIT_MESSAGE="${GITMOJI_UNICODE}${COMMIT_MESSAGE/\:$GITMOJI\:}"
199+ fi
200+ fi
186201 git add .
187- git commit -m $(git show-branch --no-name origin/${CIRCLE_BRANCH}) || true
202+ git commit -m "${COMMIT_MESSAGE}" || true
188203 git push -f origin gh-pages || true
189204
190205workflows :
You can’t perform that action at this time.
0 commit comments