I am trying to create a new BitBucket project using scriptrunner. There seem to be a lack of examples on this and I am very confused by the documentation.
The idea is to have something working on the Script console that then I can use as a built it script.
I have tried using ProjectCreateRequest.Builder but in all honesty I cannot make sense of how to create an instance in order to pass it as a parameter to a ProjectService "create" method, I am not able to pass the static type checking.
Does anyone have an example of give me some pointers on how this will work?
Please try the following script in the Script Console, which in this example creates a new project with the key "NEW" and name "New Project".
ProjectService projectService = ComponentLocator.getComponent(ProjectService)
projectService.create(new ProjectCreateRequest.Builder().key("NEW").name("New Project").build())
I hope this helps answer your question?
Hey Community! I work on the Bitbucket product marketing team. With Halloween approaching, we wanted to discuss a topic tailor-made for October: development horror stories. Whether it was a lurk...
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