3 ms·
Thank you! I completely empathize with the time involved learning new tools. I'm happy to create a tutorial specific to your use case. We've built a few workfl
by dylburger 7y ago
Thank you!
I completely empathize with the time involved learning new tools. I'm happy to create a tutorial specific to your use case. We've built a few workflows to process Github events and I'd love to show you how this works end-to-end.
Is there anything specific you'd like to do with the commit / merge events, just so I make sure the tutorial targets your use case?
Feel free to reach out directly if you'd like to talk more at dylan [at] pipedream [dot] com.
- hanniabu 7y agoThanks for the response and involvement in this thread, it really shows how committed you guys are to providing a great user experience. The specific use-case I have in mind is that when a commit made I'd want to run various checks on configuration files in the repo to make sure specific conventions are followed and that certain file references exist. Upon a merge I'd like run a build process and send the build files to Heroku, Digital Ocean, or AWS.
- dylburger 7y agoGot it! I'll aim to get something to you in the next couple of days.
- dylburger 7y agoThe easiest way to run code in response to Github events is using Github's built-in webhooks for a repo. I made a video showing you how to set that up to forward events from your repo (e.g. every time you merge a branch to master), then run code on Pipedream in response: https://www.youtube.com/watch?v=9ZGNP1-1vyg&feature=youtu.be https://www.youtube.com/watch?v=9ZGNP1-1vyg&feature=youtu.be You can load the workflow I created for the video here: https://pipedream.com/@dylburger/template-workflow-to-process-github-events-p_6lCOKW/edit https://pipedream.com/@dylburger/template-workflow-to-proces... and press the Fork button in the top right to create a copy of it in your own account. You can modify that copy and run it for free. The video isn't perfectly polished and I made a few mistakes, but we've built Pipedream to make it easy to debug your workflows, too, so I hope the mistakes help you understand part of its power! A couple of notes on your specific use case: * There's no webhook event for new commits. A PR (like I show in the video) or a push might be the best event to listen for. You can then run Node code to list commits associated with that push. See the API docs for commits here: https://developer.github.com/v3/repos/commits/ https://developer.github.com/v3/repos/commits/ . * I wasn't sure specifically what build process you wanted to run, so I end the video reviewing how to add new steps to the workflow and walk through a few options: you can run any Node.js code or any of our pre-built actions. You have access to the /tmp dir on Pipedream and can use a package like child_process [1] to spawn some commands if you need to run anything on the shell. Unfortunately you don't have access to a full shell but let me know if what we provide works or doesn't — we'd love the feedback. Let me know if that helps or if you have any questions! [1] https://www.freecodecamp.org/news/node-js-child-processes-everything-you-need-to-know-e69498fe970a/ https://www.freecodecamp.org/news/node-js-child-processes-ev...