Open Cyclonit opened 5 months ago
Agreed. We can also mention something like:
{ pattern = '.*', replace_command = 'typos --write-changes -' }
is the equivalent of:
echo "<matched_part_of_the_changelog>" | typos --write-changes -
Marked as good first issue, feel free to tackle this as well!
Is there an existing issue or pull request for this?
Feature description
changelog.postprocessors
andgit.commit_preprocessors
work on the entire changelog or git message respectively. The documentation does not clearly describe this. As a first time user, one might expect that either processor only affects the part of the input that actually matches thepattern
.For example, a postprocessor like the following would be expected to replace all occurrences of
<REPO>
withhttps://github.com/orhun/git-cliff
. It replaces the entire changelog instead.Desired solution
The documentation should be revised in all places to clearly state that
pattern
does not limit the scope of the replacement, but instead is only used to check if a given string is supposed to replaced entirely.Alternatives considered
None
Additional context
No response