I am using Windows system.
I am configuring Bit-bucket precommit hooks, Use case is "I want to reject all the commits that doesn't have a valid JIRA key"
I have tried different plugins like "Yet another commit checker" "Control Freak" and some other free plugins from market place.
I have also tried to do it via script present in .git folder through gitbash, However, I want to do it on server level.
Could you please help me with how to add this restriction via any free plugins or script?
I'm one of the Control Freak maintainers. I recommend setting it up like this (click on "Administration" --> "Control Freak"):
That setup will force all commits on the protected branches (master, production, release/*) to have Jira tickets in their commit messages.
Thanks for your response @Julius Davies _bit-booster_com_
I took reference of your another answer present at https://community.atlassian.com/t5/Bitbucket-questions/Require-issue-keys-in-commit-messages/qaq-p/1171253 and tried configuring with Control freak.
However, the problem that i am facing with control freak is that i can pass jira issue key in square bracket only and it is not accepting any other commit message other than [Jira_issue_key]
Let's take an example, If my JIRA issue key is AP-242, please find following actions
Accepted commit: commit -m [AP-242]
All other commits are getting rejected other than above, like I am not able to provide any commit message. Could you please provide me how exactly you are committing to bitbucket repository with commit message.
Actuallly i am not getting any error at commit, but i am facing error while pushing code "Control freak rejected your push"
I have tried following, However, Control freak is rejecting
commit -m "AP-242 Change in add button"
commit AP-242 "Change in add button"
I have tried almost all possible ways to give commit message, However Control freak is rejecting everything, If you could let me me know how you are adding message to your commit that will be really helpful.
I am using Git-bash to commit code.
Appreciate your help!
BAZ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response @Julius Davies _bit-booster_com_
I took reference to your other answer present at https://community.atlassian.com/t5/Bitbucket-questions/Require-issue-keys-in-commit-messages/qaq-p/1171253 and tried configuring with Control freak.
However, the problem that I am facing with control freak is that I can pass Jira issue key in square bracket only and it is not accepting any other commit message other than [Jira_issue_key]
Let's take an example, If my JIRA issue key is AP-242, please find following actions
Accepted commit: commit -m [AP-242]
All other commits are getting rejected other than above, like I am not able to provide any commit message. Could you please provide me how exactly you are committing to bitbucket repository with commit message.
Actuallly i am not getting any error at commit, but I am facing error while pushing code "Control freak rejected your push"
I have tried following, However, Control freak is rejecting
commit -m "AP-242 Change in add button"
commit AP-242 "Change in add button"
I have tried almost all possible ways to give commit message, However Control freak is rejecting everything, If you could let me me know how you are adding message to your commit that will be really helpful.
I am using Git-bash to commit code.
Thanks in Advance!
BAZ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.