Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict filename pattern in Bitbucket if pattern x already exist

Dani July 23, 2020

We're looking to implement a filename pattern pre-hook in Bitbucket.

The idea is to block files with names containing a pre-existing version number in another file.

for ex.

v123_file.txt (existing file)

v123_file2.txt (new file) == block

Any ideas how to achieve this?

1 answer

0 votes
Robert Giddings _Adaptavist_
Community Champion
August 19, 2020

Hi @Dani ,

I would suggest trying out the Protect git references pre-hook in ScriptRunner for Bitbucket, which is documented here: https://scriptrunner.adaptavist.com/6.6.0/bitbucket/PreReceiveHooks.html#_protect_git_references

To understand more about the pathsMatched methods mentioned in the Protect git references documentation, see the Overview page here: https://scriptrunner.adaptavist.com/6.6.0/bitbucket/

Please let me know if this helps resolve your question?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events