This CLI reads git commits from the last N days and creates Azure DevOps work items (Tasks) using the az CLI. It then links each created item to the provided parent using az boards work-item relation add.
- Go 1.22+
- Azure CLI with the Azure DevOps extension (
az devops) - A valid Azure DevOps login or PAT
- A git repository
go build -o az-commit-tasks ./..../install.shThe installer will:
- Build the binary
- Install to
/opt/homebrew/bin(Apple Silicon) or/usr/local/bin(Intel) - If the directory is not writable, it falls back to
~/.local/bin - Add the install directory to
~/.zshrcif needed
To install to a specific directory:
./install.sh --prefix /usr/local/binIf you do not want to edit ~/.zshrc:
./install.sh --no-zshrcsource ~/.zshrcaz-commit-tasks \
--org https://dev.azure.com/<ORG> \
--project "<PROJECT_NAME>" \
--parent <PARENT_ID> \
--iteration "<PROJECT_NAME>\\Sprint <N>" \
--days 7You can also set these via environment variables:
AZDO_ORG(same as--org)AZDO_PROJECT(same as--project)AZDO_PARENT(same as--parent)AZDO_ITERATION(same as--iteration)
Example:
export AZDO_ORG="https://dev.azure.com/<ORG>"
export AZDO_PROJECT="<PROJECT_NAME>"
export AZDO_PARENT="<PARENT_ID>"
export AZDO_ITERATION="<PROJECT_NAME>\\Sprint <N>"
az-commit-tasks --days 7Quick override (parent ID only):
az-commit-tasks --parent 116773 --days 7--dayshow many days of commits to include--pathonly include commits touching a specific path (useful in monorepos)--authoronly include commits by author--fieldadd extra work item fields (key=value, repeatable)--dry-runprint the az commands without creating work items--original-hours,--remaining-hours,--completed-hoursset estimate/remaining/completed hours--time-logalias for--completed-hours--start-date,--due-date,--target-date,--finish-dateset date fields (YYYY-MM-DD or ISO format)--commentadd a discussion comment--activityset Activity (Agile/Scrum)--task-typeset Task Type (CMMI)
az-commit-tasks \
--org https://dev.azure.com/<ORG> \
--project "<PROJECT_NAME>" \
--parent <PARENT_ID> \
--iteration "<PROJECT_NAME>\\Sprint <N>" \
--days 7 \
--original-hours 8 \
--remaining-hours 6 \
--completed-hours 2 \
--start-date 2026-02-01 \
--due-date 2026-02-09 \
--comment "Auto-created from commits" \
--activity "Development"az-commit-tasks \
--org https://dev.azure.com/<ORG> \
--project "<PROJECT_NAME>" \
--parent <PARENT_ID> \
--iteration "<PROJECT_NAME>\\Sprint <N>" \
--days 14 \
--path "projects/<subproject>"- The CLI uses your current Azure DevOps login. If you prefer, set
AZURE_DEVOPS_EXT_PAT(orAZURE_DEVOPS_PAT). - Each commit becomes one work item with title
[short-hash] commit subject.