I'm working on a package manager for a specific program, and I'm utilizing Github as the host for the packages. People can submit their repositories to add them to the database.
I've made a Github App that I'm using from the website now, to fetch information about the repository (tags, contents etc.).
This works great, but I need to keep track of changes in repositories that are listed. Main example is a new tag / release - I need to update my local database with the new version / tag of the package.
Now one idea is to poll the repositories every once in a while and scan for differences - but this feels very inefficient, wasting the ratelimit, bandwidth and resources.
Since the app is private, the webhook only gets activated on changes from my organisation. Is there a way to subscribe "create" events on other (public) repositories, without the need of the owner installing the app? This would save a lot of time and resources.
Solved! Solved! Go to Solution.
Thank you for this question! Your use case sounds very interesting.
Managing (creating/updating/deleting) repository webhooks requires admin permissions on that particular repository; so it would not be possible to manage triggering webhooks for public repositories that you do not own. Having the owners of those repositories install your GitHub app, may be the best approach toward your objective.
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!