It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Enable Hooks for all repositories

Adam Nerderman Jun 27, 2013

Is there a way for administrators to setup or enable a post-receieve hook to be defined for all repositories by default and only administrators have the ability to turn it off?

1 answer

1 accepted

1 vote
Answer accepted
Charles O'Farrell Jun 30, 2013

Hi Adam,

I'm afraid there's nothing out-of-the-box that will help you here.

If you're talking about pre-built Stash plugins then I'm afraid all you can do is either use the REST api and enable them with a script, or perhaps write a plugin that detects when a repository is added and enable them automatically.

If you're creating a new, specific hook for Stash you could consider writing a plugin using the low-level Hook interface which are automatically enabled by default. The downside is you would have to write your own configuration screen manually.

If you're talking about some custom-built post-receive hooks scripts then I believe you can add them to the global Git templates directory, which Git (and therefore Stash) uses when creating a new repository. The scripts should themselves be a symlink to another file so you can update them in a single location.

Even though this is closed, you might be interested in a few of the answeres here:

https://jira.atlassian.com/browse/STASH-3382

Cheers,

Charles

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

167 views 21 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you