I would like to institute branch-specific access to a number of repositories hosted by a Bitbucket server instance. The problem is that Bitbucket only lets you put in branch-specific restrictions on a repository level.
This becomes very inconvenient when trying to administrate 15+ repositories that all have the same or similar branching schemes. Our current solution is to have home grown pre-receive hooks that do the checking. However, after having used Gitolite in a previous iteration of our workflow I recognize that it would be even safer and convenient if I could administrate my branches using Gitolite's repo groups.
Can anyone come up with a solution that does not involve too much of a hack, that will allow me to connect my BitBucket hook to Gitolite in such a way that users and groups, and authentication will be via Bitucket server.