Skip to content

chore: remove dead code from the v1.0 single-entrypoint refactor - #1859

Open
iam-kira wants to merge 1 commit into
anthropics:mainfrom
iam-kira:fix/remove-v1-dead-code
Open

iam-kira wants to merge 1 commit into
anthropics:mainfrom
iam-kira:fix/remove-v1-dead-code

Conversation

@iam-kira

Copy link
Copy Markdown

Summary

The v1.0 consolidation onto src/entrypoints/run.ts left three unreferenced items behind. Each is confirmed to have no importer or caller in src/ or test/ on current main:

Removed Why
src/entrypoints/prepare.ts Orphaned parallel copy of the prepare phase. action.yml invokes only run.ts, cleanup-ssh-signing.ts, post-buffered-inline-comments.ts. A prepare-phase bug "fixed" here has no runtime effect while drifting silently from run.ts.
src/github/operations/comments/update-with-branch.ts Exports only updateTrackingComment, which has no callers; the branch-link behaviour is now handled by updateCommentLink. File imported nowhere → removed.
checkTriggerAction in src/github/validation/trigger.ts Thin wrapper with no callers (run.ts calls checkContainsTrigger directly). Removing it makes the @actions/core import unused, so that is dropped too.

Verification

grep -rn 'entrypoints/prepare|updateTrackingComment|update-with-branch|checkTriggerAction' src test  # → no callers
  • bun run prettier --check on the edited file — clean
  • test/trigger-validation.test.ts — 27 pass, 0 fail

No behaviour change. Closes #1668

The consolidation onto src/entrypoints/run.ts left three unreferenced items
behind. Each is confirmed to have no importer or caller in src/ or test/:

- src/entrypoints/prepare.ts: an orphaned parallel copy of the prepare phase.
  action.yml invokes only run.ts / cleanup-ssh-signing.ts /
  post-buffered-inline-comments.ts. Nothing imports it, so a prepare-phase bug
  'fixed' here would have no runtime effect while silently drifting from run.ts.
- src/github/operations/comments/update-with-branch.ts: exports only
  updateTrackingComment, which has no callers; the branch-link behaviour is now
  handled by updateCommentLink. The file is imported nowhere, so it is removed.
- checkTriggerAction in src/github/validation/trigger.ts: a thin wrapper with no
  callers (run.ts calls checkContainsTrigger directly). Removing it makes the
  '@actions/core' import unused, so that is dropped too.

No behaviour change. Closes anthropics#1668

This branch has not been deployed

No deployments
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.

Dead code from the v1.0 single-entrypoint refactor: orphaned src/entrypoints/prepare.ts and three unused exports

1 participant