Skip to content

feat: Implemented changedFilePattern && migrated raw Git cmds to go-git - #3

Open
ChanduBobbili wants to merge 18 commits into
mainfrom
feat/changed-file-patterns
Open

feat: Implemented changedFilePattern && migrated raw Git cmds to go-git#3
ChanduBobbili wants to merge 18 commits into
mainfrom
feat/changed-file-patterns

Conversation

@ChanduBobbili

@ChanduBobbili ChanduBobbili commented Sep 7, 2026

Copy link
Copy Markdown
Owner

This pull request transitions the CLI's internal Git operations to use the go-git library and introduces the changedFilePattern feature to selectively track specific file modifications.

Key Changes:

  • go-git Migration: Replaced brittle os/exec shell calls to the local Git binary with go-git, a pure Go implementation of Git, for tasks like reading tree states and checking diffs.
  • changedFilePattern Implementation: Added logic to filter the list of changed files against user-defined patterns, allowing the CLI to ignore irrelevant modifications (like test files or documentation) when evaluating changesets.
  • Refactored Git Utilities: Updated internal functions to interact natively with go-git repositories, worktrees, and object models instead of parsing raw stdout strings from CLI commands.
  • Improved Error Handling: Leveraged go-git's typed errors to provide more reliable and actionable error messages during Git operations.

Motivation: Relying on os/exec to run Git commands is prone to cross-platform issues, formatting inconsistencies, and requires the host machine to have Git installed. Migrating to go-git makes the changesetgoo binary entirely self-contained, robust, and idiomatic to Go. Furthermore, adding changedFilePattern gives developers fine-grained control over the changeset generation process, ensuring that semantic versions are only bumped when relevant codebase files are altered.

@ChanduBobbili ChanduBobbili self-assigned this Sep 7, 2026
@ChanduBobbili ChanduBobbili added the enhancement New feature or request label Sep 7, 2026
@ChanduBobbili ChanduBobbili changed the title feat: Enhance changeset management with configuration and Git integration feat: Implemented changedFilePattern && migrated raw Git cmds to go-git Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant