I need to develop a bit bucket pre receive hook plugin to reject the creation of new branches if already a branch is existing with same name in the repository but with different case sensitive.
Kindly let me know Which API/package do I need to use to list the existing branch names. so that I can compare and reject the push.
Or kindly let me know if any alternate approach is available to achieve this task.