I want to create a post commit hook through which I need to send a notification to the committing developer that branch pushed is not following our naming convention. So what I would like to know is:
- How to read the pushed branch name
- How to check if the branch name follows a certain pattern like "origin/name/issueid"
We want to inform user when their branch isn't follow the naming convention.
echo
$1
andoldrev
to get a feel for what's available to you.)