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

Is It possible to disable a global pre-receive hook only for 1 repo

Margaria Vince February 8, 2023

Hello, Is it possible to disable a specific global pre-hook on a repository level ? I have a pre-hook to handle tags but I have some repos that needs to not follow this rule.

To be more clear, I have a global pre-hook with a regex to manage tag naming. I need to make this pre-hook disabled since I need to check tags of those repos using another regex

1 answer

Hi @Margaria Vince 

ScriptRunner's Global level Pre-Hooks, have a Projects/repositories component, where you can define which repositories this hook applies to. This is the best way to way to achieve what you described.

 

There is also the 'condition' field where you could do something like this :

! (repository.slug == 'rep_1' && repository.project.key == 'PROJ')
However, I would strongly suggest you use the `Projects / repositories` component instead

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events