Reputation: 67
In our repository, we have instructed all developers not include one keyword (which is ops$abc) prefixed database objects. For example for "update ops$abc.tablename ." we have instructed to use update tablenane .
But developers are making this kind of mistake. Is there any way to reject push to the branch having this kind of code?
Upvotes: 3
Views: 3963
Reputation: 21
you could use git hooks feature to achieve this. BUT, it requires each developer to setup the ./.git/hooks/pre-commit
manually. Or you could create a shell script for developers in the repository to copy a pre-commit
file into ./.git/hooks
.
No matter what, it requires developers cooperation.
Upvotes: 2
Reputation: 66282
You can use GitHub protected branches:
master
or release
branch as protected.update ops$abc.tablename
.Now developers won't be able to merge pull requests (or commit directly to the protected branch) with this change.
Upvotes: 4