DEV Community

Pushpendra Singh
Pushpendra Singh

Posted on

7 1

My First Github Action, using JavaScript.

Hackathons are inspiring, I have been wanting to explore Github Actions for a while now, but I was always able to find some reasons to push it down in my to-do list.

Since the Dev.to Github Action hackathon is announced, I couldn't resist it, I jumped right into it.

And today, I created my first Github Action using JavaScript.

My Workflow

I have managed to create a Github Action which replaces text in your Github comment with emojis, comments from issues and PRs are translated.

It was created mostly with reasons to get started with Github Actions.

I explored

  • Creating a Github Action using JS.
  • Using libraries in my action.
  • Using Github Context in my action.
  • Writing workflows.

Submission Category:

Comments Emoji will fits fine with Wacky Wildcards.

Code

Add following YML in your workflow to get started.

comments.yml


name: Emoji Comments

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]

jobs:
  comment-emoji:
    runs-on: ubuntu-latest
    name: Emoji Comments
    steps:
      - uses: actions/checkout@v2
      - name: Comment Emoji - action exe
        uses: dreamer01/comments-emoji@master
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Enter fullscreen mode Exit fullscreen mode

You can find the code for the action at

GitHub logo dreamer01 / comments-emoji

A Github Action to convert your comment message to emojis.

Resources

Top comments (0)

Image of PulumiUP 2025

Let's talk about the current state of cloud and IaC, platform engineering, and security.

Dive into the stories and experiences of innovators and experts, from Startup Founders to Industry Leaders at PulumiUP 2025.

Register Now

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay