refactor: remove unused exported functions from core modules#921
Merged
Conversation
nhopeatall
approved these changes
Mar 16, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — Clean dead-code removal. I verified every deleted export has zero external callers in src/:
getAuthenticatedUser(),addIssueCommentReaction(),addReviewCommentReaction(),branchExists(),GitHubReactionContent— no references outsidesrc/github/client.tsloadEnvConfig()/getEnvOrThrow()— zero callers anywhereisBacklogEmpty()— zero callers, correctly deprecatedextractPRTitle()— only called withinsrc/pm/lifecycle.ts(correctly made module-private)getTrelloCredentials()— only called withinsrc/trello/client.ts(correctly made module-private)TrelloCard,TrelloComment,TrelloAttachmentre-exports fromtrello/types.ts— no consumers import these types fromtypes.ts; they import fromtrello/client.tsdirectly
Test updates are consistent with the source changes — removed test blocks correspond exactly to removed/unexported functions. The satisfies GitHubClientContract on mockGithubClient in sharedMocks.ts ensures the mock stays in sync with the real client shape, so the removal of mock methods is type-safe. All CI checks pass.
🕵️ claude-code · claude-opus-4-6 · run details
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes dead exports from 6 source files to reduce the public API surface to match actual usage patterns.
src/github/client.ts: RemovedgetAuthenticatedUser()standalone function,addIssueCommentReaction(),addReviewCommentReaction(),branchExists()methods, andGitHubReactionContenttype (none were called outside this file)src/trello/client.ts: Removedexportkeyword fromgetTrelloCredentials()— function kept for internal use bygetClient()andtrelloFetch()src/trello/types.ts: Removed dead re-export line forTrelloCard,TrelloComment,TrelloAttachment;TrelloCredentialsinterface retainedsrc/pm/lifecycle.ts: Removedexportkeyword fromextractPRTitle()— function kept for internal use byhandleSuccess()src/config/env.ts: RemovedloadEnvConfig()and itsgetEnvOrThrow()helper;loadEnvConfigSafe()andgetEnvOrDefault()preservedsrc/triggers/shared/backlog-check.ts: Removed deprecatedisBacklogEmpty()function (marked@deprecated, zero external callers);isPipelineAtCapacity()unaffectedTest files updated:
tests/unit/github/client.test.ts: RemovedbranchExists,addIssueCommentReaction,addReviewCommentReaction,getAuthenticatedUserdescribe blocks and mock entriestests/helpers/sharedMocks.ts: RemovedaddIssueCommentReaction,addReviewCommentReaction,branchExistsfrommockGithubClienttests/unit/pm/lifecycle.test.ts: RemovedextractPRTitleimport and describe blocktests/unit/trello/client.test.ts: RemovedgetTrelloCredentialsimport and describe blocktests/unit/triggers/shared/backlog-check.test.ts: Removed entireisBacklogEmptydescribe blockTest plan
npm run typecheckpasses (zero errors)npm run lintpasses (zero errors)npm testpasses (293 test files, 5438 tests)Closes: https://trello.com/c/69b8361eabcecdb304177206
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details