For integration purposes, I need to create a pull request as a specific user, from a service account. There Doesn't seem to be any efforts underway to implement this, the only reference I can find to it is in a comment on this issue (which seems to misunderstand what the original submitter is asking for): https://jira.atlassian.com/browse/STASH-4185
After carefully looking at all the non-internal (and internal too) APIs available to plugins, I can't see how to change a PR's owner after the fact. I had the idea to try making an "api proxy" that would let you "sudo" to some other user then execute a rest call, but I'm not sure how to do that either.
Given that you can run code as some other user using SecurityService.impersonating(...).call(...), is there a way for a plugin to impersonate another user, get a session cookie or oauth token of some sort, then make rest calls on their behalf? Or is there a way better way to do this? Right now our tool makes rest calls so if we could just point it at the "sudo proxy" without changing anything else that'd be a big win.
Thanks!
-Carl
Community moderators have prevented the ability to post new answers.
Also relevant: https://answers.atlassian.com/questions/11982844/how-can-i-change-the-creatorauthor-of-a-pull-request Is this still the best answer?
Hello Carl,
Did you find/create a solution for this issue?
Cheers,
Herman
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.