Files
medusa-store/docs-util/packages/docblock-generator
Shahed Nasser 96629f1916 docs: change process for generating docblocks through actions (#6237)
This PR changes the original process of generating docblocks through actions. The process now is:

1. When a PR is merged for the branch `changeset-release/develop`, the docblock generator tool us used to generate docblocks for the changed files. The changed files are determined by retrieving all comments since the last release and the files in each of those commits.
2. If there are changes after using the docblock generator tool, a PR is opened in the branch `chore/generate-tsdocs`.
3. Once the `chore/generate-tsdocs` is merged, it triggers an action that generates the references for the docs. This changes the previous behaviour of generating references on a new release.

Both actions (that runs the docblock generator tool and that generates references for the docs) can also be triggered manually.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-29 08:05:14 +00:00
..

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

  1. Run the yarn command to install dependencies.
  2. Copy the .env.sample to .env and change the MONOREPO_ROOT_PATH variable 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.