Skip to content

Add branchFormat support for Jira issues#937

Open
kazimzaidi wants to merge 1 commit intoiloom-ai:mainfrom
kazimzaidi:feat/jira-branch-format
Open

Add branchFormat support for Jira issues#937
kazimzaidi wants to merge 1 commit intoiloom-ai:mainfrom
kazimzaidi:feat/jira-branch-format

Conversation

@kazimzaidi
Copy link
Copy Markdown

Summary

  • Add branchFormat configuration option for Jira issue management, enabling custom branch naming templates
  • Introduce TemplateBranchNameStrategy with {ticketId} and {slug} variable substitution
  • Wire branchFormat through the full pipeline: settings schema → JiraIssueTracker → IssueTracker interface → LoomManager → BranchNamingService
  • Expose branchFormat on LinearService for parity (was already in schema but unused)

Motivation

Jira users often have branch naming conventions tied to their ticket IDs (e.g., PRINT-1234-fix-deps-bug). The current hardcoded feat/issue-{number}__{slug} format doesn't support this. Linear already had branchFormat in its schema (though unused) — this completes the feature for both providers.

Configuration

{
  "issueManagement": {
    "provider": "jira",
    "jira": {
      "branchFormat": "{ticketId}-{slug}"
    }
  }
}

il start PRINT-1234 → branch name: print-1234-fix-deps-bug

Test plan

  • All 4995 existing tests pass (zero failures)
  • TypeScript compiles with zero errors
  • Added 14 new tests covering TemplateBranchNameStrategy, slugify, and branchFormat integration
  • Manual test: configure branchFormat in .iloom/settings.json and run il start with a Jira ticket

🤖 Generated with Claude Code

Allow Jira users to configure a custom branch naming template
via issueManagement.jira.branchFormat in settings.json. The
template supports {ticketId} and {slug} variables, producing
branches like "print-1234-fix-deps-bug" instead of the default
"feat/issue-PRINT-1234__fix-deps-bug" format.

Changes:
- Add TemplateBranchNameStrategy and slugify utility
- Add branchFormat to Jira settings schema (both v1 and v2)
- Wire branchFormat through JiraIssueTracker -> IssueTracker
  interface -> LoomManager -> BranchNamingService
- Expose branchFormat on LinearService for parity
- Add comprehensive tests for template strategy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant