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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,458
Community Members
 
Community Events
185
Community Groups

Can I install my own hooks and examples for pre-existing hooks for ScriptRunner?

I have developed a couple different conditions and custom hooks for ScriptRunner.  Is it possible to "install" these so that other users can select them. For example for the Post Receive Email hook I have a customized template that I would like other project admins to be able to select and use, possibly tweaking it. It would be great if it should be displayed when they click expand on the examples.  For another hook, I created a custom hook which would be nice to have listed as a choice in the Scripts Pre hooks.

1 answer

0 votes
adammarkham
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 25, 2017

Hi Steven,

Apologies for the late reply. You currently can't do this without taking the current script and modifying it, effectively having a copy of it that you then place under one of your script roots.

The original script can be found if you unzip the JAR file and go to: com/onresolve/scriptrunner/canned/bitbucket/events/email/StashSendCustomEmailPostReceive.groovy

 

The conditions are a bit more complicated you'll need to check what's returned in com.onresolve.scriptrunner.canned.bitbucket.util.BitbucketConditionUtils#getConditionParam and add to the examples in the same format.

Hope this helps.

Adam

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events