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
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
- https://github.com/JasonEtco/actions-toolkit Library for integrating actions
- https://github.com/twilio-labs/actions-sms Official Twilio Action
Top comments (1)
Hi Athul, you can buy a us phone number and add your personal number in verified phone number section to get sms on it.