Skip to content

Conversation

mmeester
Copy link

@mmeester mmeester commented Jul 30, 2025

Resolves #285
Pr on top of #284

This pull request introduces a plugin system for changelogen, enabling users to extend and customize the changelog generation process. Key changes include updates to the configuration structure, the addition of a plugin manager, hooks for plugin interaction, and enhancements to commit and markdown processing. These changes aim to make the tool more flexible and extensible.

Plugin System Implementation:

  • New Plugin System Documentation: Added comprehensive documentation in docs/plugins.md detailing plugin capabilities, lifecycle hooks, configuration, and examples, including a Jira integration plugin.
  • Plugin Section in README: Introduced a new "🔌 Plugin System" section in README.md with an overview, examples, and available hooks for plugin development.

Codebase Updates for Plugin Support:

  • Plugin Manager Integration: Incorporated PluginManager into the main flow in src/commands/default.ts. Added lifecycle hooks (beforeCommitParsing, afterCommitParsing, etc.) to allow plugins to modify commits, versions, and markdown during changelog generation. [1] [2] [3] [4]
  • Configuration Enhancements: Updated ChangelogConfig in src/config.ts to include a plugins field for plugin configuration. Ensured default values and proper resolution of plugin settings. [1] [2] [3] [4]

Commit and Markdown Processing Enhancements:

  • Commit Metadata and References: Extended RawGitCommit in src/git.ts to include fullHash and made Reference types extensible for custom plugin-defined references. Updated commit parsing to support Azure-specific hashes. [1] [2] [3]
  • Custom Reference Formatting: Enhanced formatReferences in src/markdown.ts to handle custom references (e.g., Jira tickets) with optional URLs.

Miscellaneous:

  • Export Updates: Added exports for new plugin-related modules in src/index.ts and src/plugins/index.ts. [1] [2]

mmeester added 3 commits July 25, 2025 15:12
use full hash to be used in url and generate short hash for pretty formatting
- add plugin manager and types
- support npm and local plugin loading
- implement hook execution for commit parsing, version bumping and markdown generation
- update markdown generation to handle custom references
- add plugin documentation and examples
- include plugin tests and configuration support

BREAKING CHANGE: changes to internal APIs and commit processing flow
@mmeester mmeester changed the title feat(azure): support compare changes link for azure repos feat(plugins): implement plugin system with lifecycle hooks Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin System for Changelogen

1 participant