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?
Community moderators have prevented the ability to post new answers.
The best example to look at would be the following plugin:
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.
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.
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