This article explains how to create a Bitbucket repository during a workflow transition using Run CLI Actions in Jira app.
...
Use createRepository action to create a Bitbucket repository. You need to add this CLI action in the workflow of Jira where you want the action to be executed.
- Log in as a Jira Administrator.
- Navigate to the > Issues and click Custom fields.
- Click Add Custom field to create two custom fields of type Text field to add the Bitbucket repository and project to the specific screens.
- Under the Workflows tab, click the Edit link to modify the concerned workflow.
- Select the transition for which you want to add or edit the post function. Select the Post Functions option.
- Select CLI action from the available options. Click Add.
Add the Bitbucket CLI action, createRepository, under Action field as shown in the below screenshot: Here, replace the server, user, password and enter the custom field substitution variables for the parameter project and repository.
CLI action:Code Block theme Midnight -a createRepository --server http://example.com/ --user xxxx --password xxxx --project "%original_customfield_xxxx%" --repository "%original_customfield_xxxxx%"
- Click Add and Publish the workflow.
- Create an issue and enter the value of the Bitbucket Repository and project name in the custom field.
- Perform the transition on the issue to which post-function has been added. It creates the repository in Bitbucket.
The parameters used with the action are:
- --server value refers to the URL of the Bitbucket instance.
- --user value refers to the Bitbucket username.
- --password value refers to the Bitbucket password.
- --project value refers to the Bitbucket project.
- --repository value refers to the repository name.
Info |
---|
|