This plugin for `reg-suit`, a visual regression testing CLI, sends notification results to GitHub repositories. It is specifically designed for GitHub Enterprise users, utilizing the GitHub API with a personal access token for authentication, differentiating it from `reg-notify-github-plugin` which relies on a GitHub App for `github.com`. The current stable version is 0.14.6, with minor releases occurring actively as indicated by recent changelog entries. Key features include configurable GitHub URL, repository owner and name, private access token, and options for customizing the PR comment style, such as a short summary table. It's an essential component for integrating `reg-suit` results into GitHub-centric CI/CD workflows, especially in enterprise environments where GitHub Apps might be restricted.
npm install reg-notify-github-with-api-pluginVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install the plugin and configure it within `reg-suit` using a `reg.config.ts` file to enable GitHub API notifications for visual regression test results, emphasizing secure handling of sensitive credentials.
Determine your GitHub environment and preferred authentication. For `github.com` with a GitHub App, use `reg-notify-github-plugin`. For GitHub Enterprise or PATs, use `reg-notify-github-with-api-plugin`.
Ensure your Personal Access Token has the necessary `repo` scope for private repositories, or appropriate read/write access for public ones. Test the token's permissions using the GitHub API directly.
For `reg-notify-github-with-api-plugin` version 0.14.6 and higher, configure a unique `markerComment` string in your `reg.config.json` for each distinct workflow or instance of `reg-suit` running on the same PR. Example: `markerComment: 'reg-visual-tests-dark-theme'`.
Verify that the `owner` and `repository` configuration values are correct and that the `privateToken` has access to that specific repository.
Generate a new GitHub Personal Access Token with the required `repo` scope and update your `reg.config.json` or environment variable. Ensure there are no typos.
Ensure you have run `npm install reg-notify-github-with-api-plugin -D` and then `reg-suit prepare -p notify-github-with-api` to register the plugin with your `reg-suit` configuration.