-
Notifications
You must be signed in to change notification settings - Fork 9
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
Deployment #211
Comments
Will also need to ensure to clean up webhooks attached to repos and ensure there is space for the new ones |
@nelsonic should we deploy now to be able to use the app or should we wait for #197 (comment) to be addressed (it will still be very useable without this)? |
@Shouston3 Yes, let's definitely deploy what we have please 😊 |
Will do 👍 |
@Jbarget has made progress with the deployment. Just need to remove the other hooks on the dwyl repos and run the seed file with the new hooks |
@ZooeyMiller @finnhodgkin Steps to deploy the app are roughly as follows: You'll first need to run some things from the IEx shell ( alias Tudo.{GithubApi, Hook}
"dwyl" |> GithubApi.get_repos |> Enum.filter(some_filter) |> Hook.delete(some_url) Essentially remove all the webhooks that are pointing at a Let me know how you get on and post any questions here if they pop up |
Thanks Sam, sounds clear enough! We'll have a go now 👍 |
From this question:
You might need to ensure that your github account has the appropriate access and that your personal access token also has the appropriate access. Can you provide example requests that you are sending which should be working, but aren't. E.g. curl https://api.github.com/orgs/dwyl/repos\?page_results\=100\&page\=2 # gives us 404 ? |
Pretty sure the Heroku access_token has been revoked and Zooey and I don't have permissions for dwyl github things. It works perfectly on my own repos 👍 |
It does seem like a permissions issue as for the repositories which I am getting this response I also don't have a Whereas I have a settings bar for repos which I can access the webhooks for. One strange thing is that we are getting a 404 error and not 401 unauthorised error @nelsonic @iteles @markwilliamfirth could one of you try sending the exact same postman request but with your username and personal access token as the password and see if you get a different response (or anyone else with admin access or a settings tab on |
Nice spot btw @finnhodgkin @ZooeyMiller |
It looks like webhooks need admin access to repos: https://developer.github.com/v3/orgs/hooks/, and it also looks like the So to fix this permissions issue we'd need to use an access token from either an owner of the dwyl organisation, or somebody with admin access to all of the repos |
Thanks for the summary @Danwhy! Agreed that an owner token probably makes more sense as Nelson and I for example will (hopefully) be a constant and we won't need to keep swapping them around. Let's work to get you what you need (as long as we limit the access to the minimum set and if tudo is hacked they can't go deleting all our repos)! |
Done for the following & sent to @Danwhy : |
I think we'd just need access to repo hooks and org hooks. That shouldn't be a security issue as webhooks just send information to us, and don't allow any write access. @Shouston3, @finnhodgkin, @ZooeyMiller, @Jbarget Can you confirm those are the only permissions we need? |
@Danwhy I think those permissions will be all we need |
Thank you both! (hai @Shouston3 👋 Hope you're well!) |
All current repos now have the webhook attached to them, and the database should be completely up to date with all of the current issues |
All looking deployed to me, nice @Danwhy 👍 Tested on https://tudo-app.herokuapp.com |
We will need to run the seed file on heroku when deploying and simultaneously set up webhooks on all dwyl repos.
All the logic for this has been built and tested as of #201
The text was updated successfully, but these errors were encountered: