Skip to content

refactor: extract shared action helpers and deduplicate cross-action boilerplate#12

Merged
dortort merged 1 commit into
mainfrom
claude/refactor-dry-violations-A8l6m
Feb 19, 2026
Merged

refactor: extract shared action helpers and deduplicate cross-action boilerplate#12
dortort merged 1 commit into
mainfrom
claude/refactor-dry-violations-A8l6m

Conversation

@dortort
Copy link
Copy Markdown
Owner

@dortort dortort commented Feb 19, 2026

  • Add runAction wrapper in shared to eliminate identical try/catch
    error handling duplicated across all 6 actions
  • Add getActionContext to consolidate repeated initialization of
    octokit, owner/repo, and Gemini model from action inputs
  • Add parseJsonResponse<T> to replace 4 copies of JSON.parse with
    markdown fence stripping
  • Extract collectVersionChanges helper in parsers.ts to deduplicate
    the version-diff collection pattern repeated for npm, composer,
    pip, and go ecosystems
  • Remove dead code in pr-from-issue (unused existingSha ternary that
    always evaluated to undefined)

https://claude.ai/code/session_017fwXR9qdd7YhM5CSQoY3e3

…boilerplate

- Add `runAction` wrapper in shared to eliminate identical try/catch
  error handling duplicated across all 6 actions
- Add `getActionContext` to consolidate repeated initialization of
  octokit, owner/repo, and Gemini model from action inputs
- Add `parseJsonResponse<T>` to replace 4 copies of JSON.parse with
  markdown fence stripping
- Extract `collectVersionChanges` helper in parsers.ts to deduplicate
  the version-diff collection pattern repeated for npm, composer,
  pip, and go ecosystems
- Remove dead code in pr-from-issue (unused `existingSha` ternary that
  always evaluated to undefined)

https://claude.ai/code/session_017fwXR9qdd7YhM5CSQoY3e3
@dortort dortort merged commit 007e58a into main Feb 19, 2026
1 check passed
@dortort dortort deleted the claude/refactor-dry-violations-A8l6m branch February 19, 2026 20:24
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