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?
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
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