Skip to content

refactor!: remove legacy get-commits, get-latest-commit and get-changed-files - #228

Open
metalwarrior665 wants to merge 2 commits into
masterfrom
claude/quirky-goldberg-m8y1ok
Open

metalwarrior665 wants to merge 2 commits into
masterfrom
claude/quirky-goldberg-m8y1ok

Conversation

@metalwarrior665

@metalwarrior665 metalwarrior665 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

I think this makes sense, users can use get-affected-actors to get changedFiles too.

AI

get-affected-actors (#204) now computes commits, changed files and changelog in one place from a single diff path. The three older commands (get-commits, get-latest-commit, get-changed-files) are documented as "kept for older workflows", but no workflow in this repo uses them. They still carry a second, parallel git model:

  • getCommits, which has its own rerun and base-commit heuristics and duplicates what since does in get-affected-actors.
  • getChangedFiles, which is getChangedFilesBetween with a ~ hack.
  • parseBaseCommit, with the "SHA or Commit JSON" overload that only existed to pipe get-latest-commit output back in.
  • The --source-branch, --target-branch and --base-commit flags, the gitRangeOptions group and the Config type.

#218 left these out on purpose and said the call belongs to the maintainers. This PR is that proposal.

What

  • Remove the three commands and everything only they used. About 140 lines of source and about 250 lines of tests go away.
  • resolveReleaseBaseCommit now validates the SHA inline and reuses findCommitSha, instead of a second copy of the "rev-parse exit code 1 means missing" handling.
  • Drop the "Legacy git commands" section from docs/cli.md. CONTRIBUTING's CLI example now uses get-affected-actors --base master.
  • Delete logging.test.ts. It compiled the whole project with tsc (the cause of test: raise the Vitest hook timeout to 60s #227's timeout) just to check log levels through get-commits. The same check is now two cases in cli-bundle.test.ts that run get-affected-actors against the committed bundle.
  • Rebuild the CLI bundle.

Breaking

Anyone who calls these three commands directly breaks. The workflows-v0 reusable workflows don't, so only external users scripting the CLI are affected. Since we're before v1, this is the cheapest time to drop them. Whether to do it is the open question for reviewers.

Other ideas I considered and left out

Each overlaps an open PR, so it would conflict:

Checks

  • tsc, eslint, prettier, knip (the unused exports it lists were already on master) and npm test pass: 31 files, 438 tests.

Generated by Claude Code

claude and others added 2 commits November 2, 2026 07:46
…ed-files

get-affected-actors reports the same commits and changed files from one
shared diff path. Dropping the three legacy commands removes getCommits,
getChangedFiles, parseBaseCommit, the --base-commit/--source-branch/
--target-branch flags and the Config type, and lets resolveReleaseBaseCommit
reuse findCommitSha.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016XtpQvEqmuEhj1cBAaUxML
@metalwarrior665
metalwarrior665 marked this pull request as ready for review November 3, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants