Skip to content

re-add ts-node patch #1723

re-add ts-node patch

re-add ts-node patch #1723

Workflow file for this run

name: Emoji
on: [ push, pull_request ]
env:
PIP_DISABLE_PIP_VERSION_CHECK: yes
jobs:
check-emoji:
name: Check for emoji in commit message
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch PR commit
if: github.event_name == 'pull_request'
run: git fetch origin ${{ github.event.pull_request.head.sha }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install required library
run: pip install "emoji==2.*"
- name: Run the check
shell: python
run: |
import emoji, os
if "${{ github.event_name }}".startswith("pull_request"):
commit = "${{ github.event.pull_request.head.sha }}"
else:
commit = "${{ github.sha }}"
commit_message = os.popen(f"git show -s --format=%B {commit}").read()
if not emoji.emoji_count(commit_message):
exit("No Emoji found. 👎")