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-4/

Changelog Link Generator

Build a tool that generates a changelog entry with properly formatted reference links for commits, issues, and pull requests.

Capabilities

Generate changelog with reference links

Your tool should accept commit data and repository context, then generate a changelog entry where references to issues, pull requests, and commit hashes are automatically converted to clickable links.

  • Given a single commit with hash "abc123def456", type "feat", subject "add new feature", and repository context (host: "https://github.com", owner: "myorg", repository: "myrepo", linkReferences: true), the generated changelog contains the text "add new feature" and includes a markdown link in the format [abc123d](https://github.com/myorg/myrepo/commit/abc123d) @test
  • Given a single commit with subject "fix bug" and a reference object {action: "Closes", issue: "42"}, and repository context with linkReferences enabled, the generated changelog includes a markdown link [#42](https://github.com/myorg/myrepo/issues/42) @test
  • Given a single commit with multiple references [{action: "Fixes", issue: "10"}, {action: "Closes", issue: "20"}], the generated changelog includes links for both issues @test
  • Given repository context with linkReferences: false, the changelog output contains commit subjects and reference numbers as plain text without any markdown links @test

Implementation

@generates

API

/**
 * Generates a changelog entry with automatic reference linking.
 *
 * @param {Array<Object>} commits - Array of commit objects with structure:
 *   - hash: commit hash string
 *   - type: commit type (e.g., "feat", "fix")
 *   - subject: commit subject line
 *   - references: array of issue/PR references (e.g., [{action: "Closes", issue: "42"}])
 * @param {Object} context - Context object with repository information:
 *   - host: repository host URL (e.g., "https://github.com")
 *   - owner: repository owner
 *   - repository: repository name
 *   - linkReferences: boolean to enable/disable automatic linking (default: true)
 *   - commit: URL path segment for commits (default: "commit")
 *   - issue: URL path segment for issues (default: "issues")
 * @returns {Promise<string>} Formatted changelog string with reference links
 */
async function generateChangelog(commits, context) {
  // IMPLEMENTATION HERE
}

module.exports = {
  generateChangelog
};

Dependencies { .dependencies }

conventional-changelog-writer { .dependency }

Provides changelog generation with automatic reference linking support.

Install with Tessl CLI

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

tile.json