Releases: hemandev/codeowners-git
v2.2.0
v2.1.0
Minor Changes
-
9dab921: Add
--dry-runand--jsonflags for all major commandsNew Features
-
--dry-runflag — Available onbranch,multi-branch, andextractcommands. Shows a complete preview of what would happen (files, branches, commit messages, settings) without performing any git operations. -
--jsonflag — Available onlist,branch,multi-branch, andextractcommands. Outputs machine-readable JSON to stdout and suppresses all human-readable log messages. Works with both normal execution and--dry-runmode.
Details
list --json: Outputs{ command, files, filters }or{ command, grouped, filters }when used with--groupbranch --dry-run: Shows owner, branch name, branch existence, commit message, matched/excluded files, and push/PR/flag settingsbranch --json: Outputs branch result with success status, files, push state, and PR infomulti-branch --dry-run: Shows per-owner breakdown (branch, message, files), uncovered files, unowned files, and summary totalsmulti-branch --json: Outputs aggregate results with per-owner success/failure detailsextract --dry-run: Shows source, compare target, files to extract, excluded files, and filter settingsextract --json: Outputs extracted file list and source metadata- Silent mode suppresses all
console.log/warn/erroroutput when--jsonis active; JSON is written via saved originalconsole.log pushBranchingit.tssupports asilentoption to switchstdiofrom"inherit"to"pipe", preventing output leaks during JSON moderecovercommand is intentionally excluded from both flags (interactive with prompts)
-
v2.0.2
v2.0.1
v2.0.0
Major Changes
-
3b6a133: list and recover command enhancements
Breaking Changes
- All commands: Now work on staged files instead of unstaged files. Stage your changes with
git addbefore running commands. listcommand: Removed-o, --ownerflag - use--includeinstead for owner filteringbranchcommand: Renamed-o, --ownerto-i, --includefor consistency with other commandsextractcommand: Renamed-o, --ownerto-i, --includefor consistency with other commands- Path patterns: Changed from comma-separated to micromatch brace expansion syntax
- Before:
packages,apps(comma-separated) - After:
{packages,apps}(brace expansion)
- Before:
New Features
listcommand: Added[pattern]positional argument for path filtering (consistent withbranchandmulti-branch)listcommand: Added--group, -gflag to group files by code ownerlist,branch,multi-branch,extractcommands: Added--exclusive, -eflag to only include files where the owner is the sole owner (excludes co-owned files)list,branch,multi-branch,extractcommands: Added--co-owned, -cflag to only include files with multiple owners (co-owned files)extractcommand: Added[pattern]positional argument for path filtering (consistent with other commands)- Path patterns: Full micromatch/glob syntax support including
*,**,?,[...],{...}
- All commands: Now work on staged files instead of unstaged files. Stage your changes with
Minor Changes
-
c51b9c0: Add path filtering support for branch and multi-branch commands
- New optional
[pattern]positional argument forbranchandmulti-branchcommands - Filter files using micromatch patterns (e.g.,
packages,src/**/*.tsx,packages,apps) - Directory names automatically expand to include all files (e.g.,
packages→packages/**) - Supports comma-separated patterns for multiple directories
- New optional
v1.8.0
Minor Changes
-
fca1a4d: Add graceful error handling with state tracking and recovery
This release introduces a comprehensive error handling system that prevents users from being stuck in a limbo state when operations fail:
New Features:
- State Tracking: Every operation is tracked with a unique UUID in
~/.codeowners-git/state/(user's home directory) - Recovery Command: New
recovercommand to clean up and return to original state after failuresrecover --list: List all incomplete operationsrecover --auto: Automatically recover most recent operationrecover --id <uuid>: Recover specific operationrecover --keep-branches: Keep created branches during recovery
- Graceful Shutdown: Signal handlers (SIGINT/SIGTERM) provide recovery instructions on interruption
- Enhanced Error Messages: Clear recovery instructions shown when operations fail
Improvements:
- Operations tracked through all stages (creating-branch, committing, pushing, creating-pr)
- Automatic cleanup on success (state files deleted)
- Smart cleanup on failure (return to original branch, optional branch deletion)
- State persists across crashes for reliable recovery
- Detailed per-branch status tracking (created, committed, pushed, PR created, errors)
Breaking Changes: None
Users can now confidently recover from any error scenario (network failures, process crashes, user interruptions) using the new
recovercommand. - State Tracking: Every operation is tracked with a unique UUID in
-
fca1a4d: Add
extractcommand to copy file changes from source branches/commitsNew
extractcommand allows you to:- Extract changed files from any branch or commit to your working directory (unstaged)
- Filter extracted files by codeowner using micromatch patterns (
@team-*) - Automatically detect merge-base or compare against main branch
- Review and modify extracted files before committing
Common workflow:
# Extract files from another branch cg extract -s feature/other-team -o "@my-team" # Then use branch command to commit cg branch -o @my-team -b my-branch -m "Extracted changes" -p --pr
This is useful for cherry-picking changes from colleague's branches or copying work between feature branches.
v1.7.0
v1.6.0
Minor Changes
-
41a5d2c: Add GitHub PR integration and CLI alias
- Add
--prand--draft-prflags tobranchandmulti-branchcommands for automatic pull request creation - Integrate with GitHub API to create pull requests with customizable templates
- Add
cgas a convenient CLI alias alongsidecodeowners-git - Improve workflow automation for team-based code review processes
- Add