The Lunaria GitHub Action comments on pull requests with an overview of how the changes made will affect the localization status generated after merging, including insights on possible issues and how Lunaria works.
Prerequisites
Node.js - v20.0.0 or higher.
@lunariajs/core - v0.1.0 or higher.
Set up the Action
Create a new file in your project at .github/workflows/lunaria.yml with the following content, according to the package manager used:
If everything was set up properly, the Action will now comment on every new, or updated pull request that has files tracked by Lunaria (those who do not, won’t receive a comment).
Additional step for monorepos
By default, the Action will look for the @lunariajs/core package within the base directory of your repository.
If you’re using a monorepo and the package is not installed in the root package.json file, you’ll need to set the working-directory to the correct path.
This example assumes the @lunariajs/core package was installed in the docs/package.json file, meaning working-directory should be set to docs:
Additional steps for private repositories
By default, the Action won’t run on a private repository for a lack of permissions. To fix this, you will need to follow a few additional steps:
Add the token input to both the Checkout and Lunaria steps of your workflow file at .github/workflows/lunaria.yml with the corresponding secret name you added earlier:
working-directory - Optional: a desired working directory for the Action to be run on. Should be set to the subdirectory where @lunariajs/core was installed.