Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Automatize add repositores webhook #9

Open
Kikobeats opened this issue Oct 17, 2017 · 3 comments
Open

Automatize add repositores webhook #9

Kikobeats opened this issue Oct 17, 2017 · 3 comments

Comments

@Kikobeats
Copy link

Kikobeats commented Oct 17, 2017

Hey,

Impressive work! I don't know why greenkeeper is not offering this by default, so thanks a lot for develop it.

I want to ask if could be possible automate the way you need to add webhook for every repository.

Something similar to https://github.com/apps/greenkeeper/installations/new. I suppose is not possible provide a generic solution because each grenkeeper-keeper instance is different.

Maybe we can add a script or CLI tool for do that automatically. I'ts a nightmare do this manually, specially when you have more than 200 repositories on GitHub.

@travi
Copy link
Member

travi commented Oct 17, 2017

i think something along these lines is possible. i just havent found the time to investigate very deeply yet.

basically, i think the token used by the greenkeeper-keeper instance needs to have the appropriate scope (not sure which scope this would be without investigating) to be allowed to create the webhook. in addition, i imagine there is a webhook (again, would have to look to see which webhook) that fires from github when a new repo is created so that it would trigger the instance to setup the webhook that it needs for managing the PRs. scripting it for existing repos might involve a bit more scripted interaction with the github api, like you mentioned.

to fully get to the experience like https://github.com/apps/greenkeeper/installations/new would probably require a centralized instance and probably being an app available from the github marketplace. i think there could be value in providing greenkeeper-keeper as a service like that, but i probably wont be able to take that on soon unless a bunch of people are really interested.

if having the instance add the hook for new repos would be helpful (or at other triggers if you can think of others) would be enough, and you could help track down the following details, i'd be fully on board for adding such an enhancement.

  • what scope is needed for adding webhooks through the api
  • what webhook should the instance listen for to know a new repo has been created (or other events have happened that should trigger adding the hooks)

@travi
Copy link
Member

travi commented Mar 18, 2018

This seems like it could maybe get us close to this goal: https://developer.github.com/v3/repos/hooks/#pubsubhubbub

@travi
Copy link
Member

travi commented Mar 18, 2018

Also worth keeping an eye on: repository-settings/app#4

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

No branches or pull requests

2 participants