I have preUpdate hook, that checks several restrictions. When needed it will reject the push. Something like: public RepositoryHookResult preUpdate(@NonnullPreRepositoryHookContext preRepositoryHookContext, @Nonnull RepositoryHookRequest repositoryHookRequest) {
… return RepositoryHookResult. accepted (); // or rejected
}
But I would like it to apply those restrictions only for Master branch. Any idea how can I check the branch name?