fix/prdescribe-patch #8

Merged
gmgauthier merged 2 commits from fix/prdescribe-patch into master 2026-03-31 10:02:35 +00:00

2 Commits

Author SHA1 Message Date
Gregory Gauthier
403a408f8d refactor(cmd): make git diff mockable in pr-describe command and tests
All checks were successful
CI / Test (pull_request) Successful in 44s
CI / Lint (pull_request) Successful in 27s
CI / Build (pull_request) Successful in 20s
- Introduce `gitDiff` variable as a mockable wrapper for `git.Diff`.
- Update tests to use `withMockGitDiff` for injecting diff mocks.
- Minor flag description tweak for clarity.
2026-03-31 10:54:37 +01:00
Gregory Gauthier
452051f0c1 refactor(git): improve diff handling to tolerate exit code 1
- Introduce git.Diff function that uses CombinedOutput and treats exit code 1 as success (indicating changes exist).
- Update prdescribe command to use git.Diff and trim whitespace when checking for empty diffs.
- Enhance prdescribe output to include base branch in the status message.
2026-03-31 10:40:33 +01:00