Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I need reject commit if code contains some pattern.
For example:
def someMethod():
print("somePattern")
someMethod()
I need reject that commit becase it contains "somePattern" .
Can i do this?
Hi @Nikita Mesnyankin ,
Yes, we are looking into providing some examples, on how to do this. Which should be available some time in the New Year.
Kind regards,
Robert Giddings,
Product Manager, ScriptRunner for Bitbucket
Hi @Nike ,
We have now published a Script to our Adaptavist Library that shows an example of blocking commits based on file content.
The Script can be found here: https://library.adaptavist.com/entity/block-commits-for-files-containing-content-that-doesnt-match-regex
Kind regards,
Robert Giddings,
Product Manager,
ScriptRunner for Bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register Now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.