ADBM is a command-line utility designed to streamline the management of development branches in a Git repository, particularly for tasks associated with Azure DevOps work items. It allows you to create branches based on work item details and configure essential settings like project name, organization, and personal access tokens (PATs).
- Create Branches: Automatically generate Git branches based on Azure DevOps work item details.
- Configure Settings: Set up your project, organization, and PAT.
- Validate PAT: Check if the provided PAT is valid and has the necessary permissions.
To install adbm
, you can use curl
to download the installation script directly from this repository. Follow the steps below:
-
Download and Run the Installation Script:
curl -s https://raw.githubusercontent.com/ivasik-k7/azure-devops-branch-manager/main/scripts/install.sh | bash
-
Verify Installation: After running the installation script, you can use the
adbm
command to run the system monitor script from any location:adbm help
To uninstall adbm
and remove the the command, use the following steps:
-
Download and Run the Uninstallation Script:
curl -s https://raw.githubusercontent.com/ivasik-k7/azure-devops-branch-manager/main/scripts/uninstall.sh | bash
-
Verify Uninstallation: Ensure the
adbm
command is no longer available:adbm help # Expected output: bash: adbm: command not found
Displays usage information and helps you understand how to use the script.
Usage:
adbm help
Configures essential variables needed for the script to function. The script requires the following variables:
project=<project_name>
: The name of your Azure DevOps project.organization=<organization_name>
: The name of your Azure DevOps organization.pat=<personal_access_token>
: Your Azure DevOps Personal Access Token.
Usage:
adbm configure project=your_project_name organization=your_organization_name pat=your_personal_access_token
Creates a new Git branch based on the task details retrieved from Azure DevOps. The branch name is constructed using the task ID and its details.
Usage:
adbm branch <task_id>
Before running the script, ensure you have the following utilities installed:
jq
- A command-line JSON processor.curl
- A tool to transfer data from or to a server.
- Check Utilities: Verifies that the required utilities (
jq
andcurl
) are installed. - Check Configuration: Validates that necessary environment variables (
PROJECT_NAME
,ORG_NAME
,PAT
) are set. - Validate PAT: Checks the validity of the Personal Access Token.
- Fetch Task Details: Retrieves task information from Azure DevOps using the provided task ID.
- Create Branch: Constructs a branch name based on the task details and creates the branch in the Git repository.
- Update: Call the upgrade command for making up-to-datess
- Ensure you have
jq
andcurl
installed. - Confirm that environment variables are correctly set in your
.bashrc
or another configuration file. - Check that your Personal Access Token is valid and has the required permissions.
For any issues or contributions, please refer to the project's issue tracker.