Hi there, Thanks for reaching out. The short answer to this is - You can. Here's a link from our library containing the script you are looking for. You will need to edit it to check for the particular pattern you are interested in: library.adaptavist.com/entity/prevent-push-if-commit-message-does-not-match-pattern At the same time, we also have this script that has a much more comprehensive validation check: library.adaptavist.com/entity/custom-bitbucket-commit-message-validation I hope you find both useful. If you still need to get in touch with our customer support team, please use this link: productsupport.adaptavist.com/servicedesk/customer/portal/3 Best, Debbie
@@AdaptavistEnterprise hi Thank you :) That is a perfect script, in our company, we have paid version, So i can see, 4 sections under Scriptarunner pre hook, post hook, merge checks & listeners Which one of above am i supposed to use in order to get this script running? I tried prehook --> reject merge commits But it's giving me multiple errors like, You tried to call a method which is not allowed to , CommitCallback = new PreRepositoryHookCommitCallBacks() And so on...
In ScriptRunner, I can't create any custom script to check commit message with certain conditions like, let's say starts with xyz-1234, can i ?
Hi there, Thanks for reaching out. The short answer to this is - You can. Here's a link from our library containing the script you are looking for. You will need to edit it to check for the particular pattern you are interested in: library.adaptavist.com/entity/prevent-push-if-commit-message-does-not-match-pattern
At the same time, we also have this script that has a much more comprehensive validation check: library.adaptavist.com/entity/custom-bitbucket-commit-message-validation
I hope you find both useful. If you still need to get in touch with our customer support team, please use this link: productsupport.adaptavist.com/servicedesk/customer/portal/3
Best,
Debbie
@@AdaptavistEnterprise hi
Thank you :)
That is a perfect script, in our company, we have paid version,
So i can see, 4 sections under Scriptarunner
pre hook, post hook, merge checks & listeners
Which one of above am i supposed to use in order to get this script running?
I tried prehook --> reject merge commits
But it's giving me multiple errors like,
You tried to call a method which is not allowed to ,
CommitCallback = new PreRepositoryHookCommitCallBacks()
And so on...