Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike implementation of dwylbot #6

Closed
3 tasks done
SimonLab opened this issue Mar 6, 2017 · 10 comments
Closed
3 tasks done

Spike implementation of dwylbot #6

SimonLab opened this issue Mar 6, 2017 · 10 comments

Comments

@SimonLab
Copy link
Member

SimonLab commented Mar 6, 2017

  • How to capture events from Github: new PR, new issues, changes label, change assignees...?
  • How to listen to these event with Elixir/Phoenix?
  • Do we need an authentication process to capture Githbub events?

Implement a prototype of the dwylbot to get a better idea of the technical challenges
Create implementation doc for creating the first dwylbot version

@SimonLab
Copy link
Member Author

SimonLab commented Mar 7, 2017

some links to read:

@SimonLab
Copy link
Member Author

SimonLab commented Mar 7, 2017

So:

    1. Create manually the webhooks (go to settings then webhooks) on the repository (or organisation). We can later on do this step automatically with the Github API but for a first version the UI provided by Github to add webhooks is good
    1. Create a server with at least a post route (ex: /webhooks) which will get the payloads send by the webhooks. I've manage to get this quickly done with [SimpleServer]. (https:/SimonLab/simpleServer) and ngrok (to expose my localhost server to the Github webhook instead of using Heroku)
      webhook
    1. create the logic of the server. This is the main work to be done. The logic of the rules from Actions that can trigger the dwylbot #5 needs to be implemented and triggered depending of the action type received on the payload of the post request.
    1. Use Github API to post comment, change assignee, change label... to indicate how to follow the contributing guide

So Phoenix Server + Heroku + Github webhooks for the first version.

Once the main parts of the application are done (server, tests, doc, heroku app), the idea is to have a process or architecture that allow us to create new rules quickly and easily. I will focus on this once I finish #3 as it will give me a better idea on how to abstract rules.

@iteles @nelsonic @markwilliamfirth any comments or more details you would like to see (I will add more issue when I start on #3 that will explain the implementation)?

@SimonLab SimonLab assigned nelsonic, iteles and ghost and unassigned SimonLab Mar 7, 2017
@SimonLab SimonLab added T4h and removed T4h labels Mar 7, 2017
@nelsonic
Copy link
Member

nelsonic commented Mar 8, 2017

@SimonLab this is an excellent start! (well done for spiking the web hook so quickly!) 🐎
Keep going! it sounds like you should have something useful soon! 👍
I will suggest that you start storing some of the GitHub web hook request payloads somewhere (your choice. e.g: .json on your computer or in a DB if you can) so that you can re-play them as "mock" data for tests. 😉
Thanks for doing this! You're a hero! ❤️ ✅ 🚀

@iteles
Copy link
Member

iteles commented Mar 9, 2017

@SimonLab I'd love to have an issue in learn-phoenix about using APIs and the need for tentacat ❤️

@nelsonic
Copy link
Member

@SimonLab do we have a JSON file with a sample GitHub Webhook request payload?

@SimonLab
Copy link
Member Author

I've create a few json files in the project using the issue test

@nelsonic
Copy link
Member

nelsonic commented Mar 17, 2017

@SimonLab yeah, sorry I saw the https:/dwyl/dwylbot/tree/master/github_webhooks folder shortly after asking the question and forgot to update this issue to inform you that I knew.
Thanks for your great work on this! ❤️ ✅

@ghost
Copy link

ghost commented May 10, 2017

@SimonLab what's the next steps with this issue? The implementation documentation?

@ghost
Copy link

ghost commented Jun 19, 2017

@SimonLab can this be closed?

@ghost ghost unassigned nelsonic Jun 19, 2017
@ghost ghost assigned SimonLab and unassigned iteles and ghost Jun 19, 2017
@SimonLab
Copy link
Member Author

We are now using Github App which give us webhooks and a way to install dwylbot via the Github marketplace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants