- Fix GitHub action to run on push and check if the commit message is "chore: Release". Only then are TSDocs generated and a PR is opened. - Add an option to pass to the `run:release` method of the docblock generator a release tag. This is helpful in cases when the GitHub action fails for any reason. - Add scripts that checks the message of a commit.
docblock-generator
A CLI tool that can be used to generate TSDoc docblocks for TypeScript/JavaScript files under the packages directory of the main monorepo.
Prerequisites
- Run the
yarncommand to install dependencies. - Copy the
.env.sampleto.envand change theMONOREPO_ROOT_PATHvariable to the absolute path to the monorepo root.
Usage
Generate for a specific file
Run the following command to run the tool for a specific file:
yarn start run /absolute/path/to/file.ts
Generate for git-changed files
Run the following command to run the tool for applicable git file changes:
yarn start run:changes
Generate for a specific commit
Run the following command to run the tool for a commit SHA hash:
yarn start run:commit <commit-sha>
Where <commit-sha> is the SHA of the commit. For example, e28fa7fbdf45c5b1fa19848db731132a0bf1757d.