This article explains how to create a bitbucket repo Bitbucket repository during a workflow transition using the Run CLI Actions in Jira app.
Instructions
Use createRepository action to create a Bitbucket repository. You need to add Add this CLI action in action in the relevant Jira workflow of Jira where you want the action is to be executed.
- Log in as in as a Jira Administratoradministrator.
- Navigate to the to > Issues and click Custom fields.
- Click Add Custom field to create two custom fields of type, and under the Workflows tab, click the Edit link to modify the required workflowText field, to add the Bitbucket repository and project to the specific screens.
- Click Edit to modify the concerned workflow under the Workflows tab.
- Select the transition for which you want to add to be added or edit the post function. Select , and then select the Post Functions option.
- Select CLI action from the available options . Click and click Add.
Add the Bitbucket the createRepository Bitbucket CLI action , createRepository, under Action field as shown in the below screenshot:CLI action:.
Code Block theme Midnight -a createRepository --server http://example.com/ --user xxxx --password xxxx --project "PROJ%original_customfield_xxxx%" --repository "test2-repo" --name "TFJ2-repo"
%original_customfield_xxxxx%"
Here, replace the server, user, and password parameters, and enter the custom field substitution variables for the project and repository parameters.- Click Add and Publish the workflow.
- Create an issue. Now perform , 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 if the repository does not already exist.
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 |
---|
|