Skip to content

Raza-dev-1finance/AZURE_DEVOPS_AUTO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure DevOps Tasks from Git Commits (Go CLI)

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.

Requirements

  • Go 1.22+
  • Azure CLI with the Azure DevOps extension (az devops)
  • A valid Azure DevOps login or PAT
  • A git repository

Build

go build -o az-commit-tasks ./...

Install (macOS)

./install.sh

The 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 ~/.zshrc if needed

To install to a specific directory:

./install.sh --prefix /usr/local/bin

If you do not want to edit ~/.zshrc:

./install.sh --no-zshrc
source ~/.zshrc

Usage

az-commit-tasks \
  --org https://dev.azure.com/<ORG> \
  --project "<PROJECT_NAME>" \
  --parent <PARENT_ID> \
  --iteration "<PROJECT_NAME>\\Sprint <N>" \
  --days 7

You 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 7

Quick override (parent ID only):

az-commit-tasks --parent 116773 --days 7

Common flags

  • --days how many days of commits to include
  • --path only include commits touching a specific path (useful in monorepos)
  • --author only include commits by author
  • --field add extra work item fields (key=value, repeatable)
  • --dry-run print the az commands without creating work items
  • --original-hours, --remaining-hours, --completed-hours set estimate/remaining/completed hours
  • --time-log alias for --completed-hours
  • --start-date, --due-date, --target-date, --finish-date set date fields (YYYY-MM-DD or ISO format)
  • --comment add a discussion comment
  • --activity set Activity (Agile/Scrum)
  • --task-type set Task Type (CMMI)

Example: hours, dates, comment, activity

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"

Example: filter to a project folder

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>"

Notes

  • The CLI uses your current Azure DevOps login. If you prefer, set AZURE_DEVOPS_EXT_PAT (or AZURE_DEVOPS_PAT).
  • Each commit becomes one work item with title [short-hash] commit subject.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors