Skip to content

Receitas

Notas para o próximo release

npx gitscribe                       # desde a última tag
npx gitscribe v1.0.0..HEAD --version v1.1.0

Prepend ao CHANGELOG.md

{ npx gitscribe v1.0.0..HEAD --version v1.1.0; echo; cat CHANGELOG.md; } > CHANGELOG.new && mv CHANGELOG.new CHANGELOG.md

Notas de release no GitHub em CI (modo template, sem LLM)

# on: release: { types: [created] }
- run: npx gitscribe "${{ github.event.release.tag_name }}~1..${{ github.event.release.tag_name }}" \
        --version "${{ github.event.release.tag_name }}" > NOTES.md
- run: gh release edit "${{ github.event.release.tag_name }}" --notes-file NOTES.md
  env: { GH_TOKEN: "${{ github.token }}" }

Polir localmente com Ollama

ollama pull llama3.2
npx gitscribe v1.0.0..HEAD --model llama3.2 > CHANGELOG-next.md

Uso programático

import { collectCommits, generateReleaseNotes, OllamaClient } from 'gitscribe';

const commits = collectCommits('v1.0.0..HEAD');
const notes = await generateReleaseNotes(commits, { version: 'v1.1.0', llm: new OllamaClient('llama3.2') });