Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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