CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-conventional-changelog-writer

Write logs based on conventional commits and templates.

85

1.00x
Overview
Eval results
Files

task.mdevals/scenario-6/

Release Notes Generator

Build a tool that generates formatted release notes from a list of commits. The tool should produce markdown output with proper repository links and version information.

Requirements

Your tool should accept a list of commits and configuration data, then generate release notes that include:

  1. Version header: Display the version number with a clickable link comparing it to the previous version
  2. Release date: Show the date of the release in a readable format
  3. Repository links: Convert commit references and issue numbers into clickable links to the repository
  4. Commit formatting: Display each commit with its hash, type, and description, with the hash linking to the commit in the repository

The configuration should specify:

  • The version number being released
  • The repository host (e.g., github.com)
  • The repository owner and name
  • The release date
  • Whether to enable automatic linking

Output Format

The generated release notes should be in markdown format with:

  • A header showing the version and date
  • Commits grouped by type (features, fixes, etc.)
  • Hyperlinked commit hashes and issue references
  • A comparison link between the current and previous version

Test Cases

  • Generate release notes with repository metadata and verify links are correctly formed @test
  • Generate release notes without automatic linking and verify plain text output @test
  • Generate release notes with custom date format and verify date rendering @test

Implementation

@generates

API

/**
 * Configuration for repository metadata
 */
export interface RepositoryConfig {
  version: string;
  previousVersion?: string;
  host: string;
  owner: string;
  repository: string;
  date: string;
  enableLinking: boolean;
}

/**
 * Commit data structure
 */
export interface CommitData {
  hash: string;
  type: string;
  scope?: string;
  subject: string;
  body?: string;
  footer?: string;
  notes: Array<{ title: string; text: string }>;
}

/**
 * Generates formatted release notes from commits
 *
 * @param commits - Array of commit data
 * @param config - Repository and version configuration
 * @returns Promise resolving to formatted markdown string
 */
export async function generateReleaseNotes(
  commits: CommitData[],
  config: RepositoryConfig
): Promise<string>;

Dependencies { .dependencies }

conventional-changelog-writer { .dependency }

Provides changelog generation with template-based rendering and context variables for repository metadata.

Install with Tessl CLI

npx tessl i tessl/npm-conventional-changelog-writer

tile.json