Skip to content

Update settings-access commands and lib files to use formatIssueId #599

@NoahCardoza

Description

@NoahCardoza

Summary

Migrate files that use issuePrefix from MCP providers or only have settings access to use IssueTrackerFactory.formatIssueId() static utility.

Context

Part of Epic #595. These files don't have a direct IssueTracker instance but do have access to settings or provider type, so they use the static utility.

Files to Modify

  • src/commands/commit.ts — Replace IssueManagementProviderFactory.create(providerType, settings).issuePrefix with IssueTrackerFactory.formatIssueId(providerType, id) (~2 sites)
  • src/commands/plan.ts — Replace manual prefix logic (const issuePrefix = provider === 'github' ? '#' : '') with IssueTrackerFactory.formatIssueId() (~3 sites including formatChildIssues and formatDependencies)
  • src/lib/PRManager.ts — Replace this.issuePrefix getter pattern (~5 sites)
  • src/lib/SessionSummaryService.ts — Replace hardcoded # (~2 sites)
  • src/lib/LoomManager.ts — Replace prManager.issuePrefix usage in PR body formatting (~1 site)

Acceptance Criteria

  • All issuePrefix usage in listed files replaced with IssueTrackerFactory.formatIssueId() or equivalent
  • No more manual provider === 'github' ? '#' : '' logic in these files
  • Test files updated to expect provider-formatted output
  • pnpm build passes
  • pnpm test passes

Scope Boundaries

  • Do NOT deprecate IssueManagementProvider.issuePrefix — keep for backward compat
  • Do NOT change files covered by other child issues

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions