As a System Admin, I'm trying to migrate many user's accounts which currently have forks of upstream repository, how would I go about doing that via the API.
I looked for a way to do it with the fork create request, and didn't see a way to masquerade as user option.
Cool, yea I'm going down that path, I think I have eclipse configured and the sdk installed correctly.
Was checking into the tutorials, to get a feel for coding a plugin.
You feel like sending some links that would relevant to building this project to give me a shove in the right direction?
Hi Sean,
I'm always a fan of examples over tutorials:
http://atlassian.bitbucket.org/#stash
There's obviously our dev docs as well:
https://developer.atlassian.com/stash/docs/latest/
Good luck. :)
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was hoping to do this using the Rest API, but this is exactly what I had in mind.
I'm looking to migrate a rather large userbase with quite a few Repos & quite a few Forks per Repo (from github) and I'd like to keep the structure intact. That means as far as I can tell, using the Forking creation api, you can only do it either to the user's default, or a project using a KEY.
My plan of attack was what I listed above, but if I have to go to the Java Plugin route, that would be okay whilst slower as I can write Java as well.
What do you think Charles, is there a better way to go about it?
Thanks,
Sean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sean,
Thanks for the details.
I think to create the forks themselves you're going to have to use a custom Java pluin just to create the forks. So my advice would be to import the parent repositories (either as a script/REST or Java), and then write a simple plugin that does the forking in Java. You could even just expose 'forkAsUser' as a REST endpoint and then control the rest from a script. Obviously make sure you turn that plugin off when you're done.
Let me know if you get stuck with the plugin. Also, if you can, please post any details/code on your migration as I'm sure others will find it useful. :)
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sean,
If you're talking about doing this in-process as a Java plugin you might be interested in the SecurityService. Is that what you had in mind?
Just out of curiosity what kind of migration are you doing exactly?
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.