As always i like to automate my day to day work, it’s been a long time that i didn’t make a side project or a script for my own fun.

credit: Adjustment - monkeyuser

When you work for a company you don’t have time, even if you aren’t in working hours you keep thinking about work, what the manager said to you and you didn’t respond and and…, So in those past public holiday i didn’t work and take time to my self sleeping, watching movies and go for a hikking. In short i was searching for a new side project and lgsn happned.

In the company that i work for after every push we need to send a message to a slack channel to notify the devops to deploy to the preprod. So why not automatize this, i created the API(webservice using express) to get information about what was commited after a push not that funcy code, file can be found here: index.js.

Then i deployed it to heroku, add the url of my webhook to the github repository(repository page > settings > Webhooks > Add webhook). created my slack app added the envirement variables to heroku and i’am all setup. In brief i made a webservice that get data after every push by a user and the format the data and send the output to channel/me.



Tags: dev, node.js, heroku, slack, github