This is a little toolset to make life with Atlassian Bitbucket easier. There are these helpers:
| Product | helper | description |
|---|---|---|
| Jira | jira_create_feature.py |
Restful API service that creates a set of tickets representing a feature and its sub-tasks |
| Bitbucket | bitbucket_clone_repos_in_project |
let's you clone all repositories in a specified Bitbucket project |
This python script runs a web service that allows you to create Jira tickets for a feature. It is meant to create an epic and additional tasks that are assifgned to the epic, that represent high-level things that need to be done. - This is introduced as a way to transparently show requirements that normally would have been addressed in a definition of done.
Python >= 3.11 is required with the following modules installed:
- jira
- validators
- PyYAML
- click
- uvicorn
- fastapi
- pydantic
To install the required modules simply install them with pip:
python3 -m pip install -r requirements.txt
These environment variables need to be set:
export JIRA_URL='https://<your-jira-instance>.atlassian.net'
export JIRA_USERNAME='<username>@<your-domain>'
export JIRA_API_TOKEN='<YOUR-API-TOKEN-HERE>'
export JIRA_PROJECT='<YOUR JIRA PROJECT'S NAME>'
Then you can simply run it with python3 ./jira_create_feature.py
When the server is running you can use the tool with SwaggerUI by visiting this URL with your browser:
http://localhost:8080/docs
If you are using VSCode you can simply re-open the project in a dev container.
For this to work just create a .env file in the root of this repository with the needed environment variables:
JIRA_URL=https://<your-jira-instance>.atlassian.net
JIRA_USERNAME=<username>@<your-domain>
JIRA_API_TOKEN=<YOUR-API-TOKEN-HERE>
JIRA_PROJECT=<YOUR JIRA PROJECT'S NAME>
uvicorn is configured to watch the working directory and will reload the application when it detects changes.
In case you need to start the aplpication manually simply run python ./jira_create_feature.py from within the dev container.
This python script allows you to clone all git repositories from a Bitbucket project into a given base directory.
Python >= 3.6 is required with the following modules installed:
- requests
- GitPython
- validators
To install the required modules simply install them with pip:
python3 -m pip install -r requirements.txt
$ python3 ./bitbucket_clone_repos_in_project.py --help
usage: bitbucket_clone_repos_in_project.py [-h] -u URL -l USERNAME -p PROJECT -b BASEDIR [--noverify]
optional arguments:
-h, --help show this help message and exit
-u URL, --url URL The url of your bitbucket server (e.g. https://bitbucket.example.com)
-l USERNAME, --username USERNAME
The useranme to login to your bitbucket server
-p PROJECT, --project PROJECT
The project to clone the repositories from
-b BASEDIR, --basedir BASEDIR
The basedir where the repositories should be cloned into
--noverify [optional] Disable SSL verfication by setting this parameter
$ python3 ./bitbucket_clone_repos_in_project.py -u https://bitbucket.example.com -l my-user -b ./ -p MYPROJECT
Password for my-user:
[ ... ]
- Stephan Schwarz (@stearz)