conventionalTypeFor function

String conventionalTypeFor(
  1. IssueType issueType
)

The conventional-commit TYPE a bead's issueType derives — the FALLBACK title's type ONLY (the inference picks its own type from the DIFF, which is the whole point of the directive). IssueType is an OPEN set (an extension type over the wire string), so an unknown type falls back to chore rather than throwing.

Implementation

String conventionalTypeFor(IssueType issueType) => switch (issueType.wire) {
  'feature' || 'epic' || 'story' => 'feat',
  'bug' => 'fix',
  _ => 'chore',
};