addHook
Add a lifecycle hook to the generator instance.
Usage:
TypeScript
import { Generator, BeforeGenerateContext } from "relno";const generator = new Generator([], { template: "", prTypes: [], metadata: {} as ReleaseMetadata,});generator.addHook( Lifecycle.BeforeGenerate, async (generator: Generator, context: BeforeGenerateContext) => { const commits = context.commits; // do something with the commits object },);
Learn more about lifecycle hooks.