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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Per-repository Stash plugin configuration without hooks

To handle problems mentioned here and here, I wrote a plugin that listen on pull request events and then does a POST to a pre-defined URL. Since I'll need different URLs for each repository, I need to, somehow, create a per-repository configuration for my plugin.

That seems trivial enough to do if I were using a hook, but, unfortunately, no hook covers my use case.

How can I create configuration screens per-repository, and the retrieve these settings?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted

Hi Daniel,

The best example to look at would be the following plugin:

You may also want to look at a few other UI examples here, although they don't store any settings. A list of all the Stash example plugins can be found here:

Just in general most of this relies on general Atlassian plugin components, which has plenty of documention (ie you might have more lucking searching for JIRA/Confluence than just Stash).

Let me know if you get stuck or have any questions.


PS. We do have plans to make adding plugins that save general settings as streamlined as hooks, but we haven't had the time to make that possible.

Thanks. I have been using that plugin as reference -- and all the other resources you mentioned, in fact --, though it uses the old widget.aui library and the completely undocumented soy templates, plus a lot of completely undocumented APIs. It has not been an easy task at all, despite how close it comes that my needs.

I might also add that looking at that plugin and at this tutorial, one would be hard pressed to tell what they have in common, despite the fact that the tutorial is essentially teaching most of what the refchange plugin is doing.

And, as a final note, I could not find a single other plugin that stores state and is not a hook plugin. Having other plugins to compare against each other would have made the task easier.

For more code youc an look at that might be helpful, I have just open-sourced my stashbot plugin. It does per-repository configurations which are not done as hooks and persists them using active objects. Check out

Hi Daniel,

Since then, did you manage to write this piece of plugin? I am facing with the same issue here, I want to write a simple plugin that listens to server events (so it is not a git hook) and configure settings per repository. I cannot find any useful information that I can start with, when I am new to stash plugin development. I cannot even find any documentation about these soy templates.




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