DEV Community

Athul Cyriac
Athul Cyriac

Posted on

3 1

Get SMS notifications from GitHub

What I built

SGS Stands for Short GitHub SMS 😁. It's an action which could be used to get updates about your GitHub repository like Issues and Pull Requests to your mobile number using twilio's SMS API. It's a simple JavaScript action which is below 70 lines of code.

Demo Link

I couldn't test it or demo it since there was no SMS twilio numbers to be available in India

Link to Code

https://github.com/athul/SGS

async function run() {
  const resultMessage = await client.messages.create({
    from,
    to,
    body: message,
  });
  tools.log.success("SMS Sent")
  return resultMessage
}

These 9 lines of code does all the sms work

How I built it (what's the stack? did I run into issues or discover something new along the way?)

The Stack is

  • Node.js
  • GitHub Actions

I've been hacking with actions for a few weeks so thought that this could be merged.
There was an official twilio action but it was limited to a specific message. I upgraded it to use a message with data from GitHub using literals and string truncation to reduce the title below 30 characters.Learned that 160 characters was the limit

Additional Resources/Info

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (1)

Collapse
 
akshay090 profile image
Akshay090

Hi Athul, you can buy a us phone number and add your personal number in verified phone number section to get sms on it.

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay