Skip to content

davidfou/conventionalcomments-web-extension

Repository files navigation

conventionalcomments-web-ext

Browser extension which brings conventionalcomments into GitLab and GitHub.

Installation

Firefox: https://addons.mozilla.org/de/firefox/addon/conventional-comments/
Chrome: https://chrome.google.com/webstore/detail/conventional-comments/pagggmojbbphjnpcjeeniigdkglamffk

How to contribute

Run the development build

  1. Install dependencies by running yarn
  2. Run yarn dev (it will open Firefox with the extension installed)

Run the tests

  1. Create a new GitLab and GitHub users (it's recommmended using a user without personal information)
  2. Copy config/template_local.js to config/local.js and replace all values
  3. Activate the 2FA authentication
    1. Run yarn 2fa-code an paste the code printed into the field in GitHub
    2. Finalize the 2FA
  4. Run yarn test to run unit tests
  5. Run yarn playwright test --ui to run end-to-end tests

Update the screenshots for visual regression tests

Unfortunately, the screenshots made locally are not the same as the ones made in the CI. It's possible to retrieve them from GitHub Actions when the visual tests failed. Running the command yarn update-screenshots allows to download the screenshots from a specific run. Then, push it and the tests should pass.

Build the extension

  1. Run yarn build
  2. Check folder web-ext-artifacts