feat(plugins): implement plugin system with lifecycle hooks#286
Open
feat(plugins): implement plugin system with lifecycle hooks#286
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
docs/plugins.mddetailing plugin capabilities, lifecycle hooks, configuration, and examples, including a Jira integration plugin.README.mdwith an overview, examples, and available hooks for plugin development.Codebase Updates for Plugin Support:
PluginManagerinto the main flow insrc/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]ChangelogConfiginsrc/config.tsto include apluginsfield for plugin configuration. Ensured default values and proper resolution of plugin settings. [1] [2] [3] [4]Commit and Markdown Processing Enhancements:
RawGitCommitinsrc/git.tsto includefullHashand madeReferencetypes extensible for custom plugin-defined references. Updated commit parsing to support Azure-specific hashes. [1] [2] [3]formatReferencesinsrc/markdown.tsto handle custom references (e.g., Jira tickets) with optional URLs.Miscellaneous:
src/index.tsandsrc/plugins/index.ts. [1] [2]