{"library":"reg-notify-github-with-api-plugin","title":"GitHub API Notification Plugin for reg-suit","description":"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.","language":"javascript","status":"active","last_verified":"Tue Apr 21","install":{"commands":["npm install reg-notify-github-with-api-plugin"],"cli":{"name":"reg-suit","version":null}},"imports":["import RegNotifyGithubWithApiPlugin from 'reg-notify-github-with-api-plugin';","import type { RegNotifyGithubWithApiPluginOption } from 'reg-notify-github-with-api-plugin';","reg-suit prepare -p notify-github-with-api"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm i reg-notify-github-with-api-plugin -D\nreg-suit prepare -p notify-github-with-api\n\n// Add this configuration to your reg.config.json or reg.config.ts\n// Ensure you replace placeholder values with your actual GitHub details and token.\n// For security, it's highly recommended to use environment variables for `privateToken`.\n\ninterface RegConfig {\n  plugins: [\n    'reg-keygen-git-hash-plugin',\n    'reg-publish-s3-plugin', // Or 'reg-publish-gcs-plugin' for Google Cloud Storage\n    ['reg-notify-github-with-api-plugin', {\n      githubUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com/graphql',\n      owner: process.env.GITHUB_REPO_OWNER ?? 'your-org-or-username',\n      repository: process.env.GITHUB_REPO_NAME ?? 'your-repo',\n      privateToken: process.env.GITHUB_TOKEN ?? '', // Requires 'repo' scope for private repos\n      ref: process.env.GITHUB_PR_REF ?? undefined,\n      shortDescription: true,\n      markerComment: 'reg-visual-test-results' // Optional: Customize for multiple workflows\n    }]\n  ];\n}\n\n// Example reg.config.ts (if you use TypeScript for configuration)\nconst config: RegConfig = {\n  plugins: [\n    'reg-keygen-git-hash-plugin',\n    'reg-publish-s3-plugin',\n    ['reg-notify-github-with-api-plugin', {\n      githubUrl: process.env.GITHUB_API_URL || 'https://api.github.com/graphql',\n      owner: process.env.GITHUB_REPO_OWNER || 'your-org-or-username',\n      repository: process.env.GITHUB_REPO_NAME || 'your-repo',\n      privateToken: process.env.GITHUB_TOKEN || '',\n      ref: process.env.GITHUB_PR_REF,\n      shortDescription: true,\n      markerComment: 'reg-visual-test-results'\n    }]\n  ]\n};\n\nexport default config;","lang":"typescript","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}