If you don't have one already, create a new Cloudant NoSQL database by following tutorial on Creating a Cloudant instance on Bluemix or GitHub IBM Bluemix docs.
Also, create a new database if you don't have one.
On IBM Bluemix portal, select “Browse Public Packages” to create a new cloudant package.
Select “Cloudant”:
Select “Create document” action:
Select Cloudant instance we just created in previous step named “GitHubSlackBotCloudant” and database you created.
It creates a new package “TrackPRsInCloudant” and you can view the details:
Creating an action here results in a track-pull-requests.js file with:
Now, copy code from track-pull-requests.js and paste it here.
Create trigger using “Automate this Action” option and select “GitHub WebHook”:
Add a new trigger using “New Trigger”:
Creating a new trigger takes following parameters:
GitHub WebHook trigger adds a new webhook to GitHub repo:
Now, create a rule so that “track-pull-requests” can be invoked by GitHub WebHook trigger “GitHubWebHookTrigger”.