reg-notify-gitlab-plugin

Notify reg-suit result to GitLab repository

Usage no npm install needed!

<script type="module">
  import regNotifyGitlabPlugin from 'https://cdn.skypack.dev/reg-notify-gitlab-plugin';
</script>

README

reg-notify-gitlab-plugin

reg-suit plugin to send notification the testing result to your GitLab repository.

Installing this plugin, reg-suit comments to your Merge Request.

Install

npm i reg-notify-gitlab-plugin -D
reg-suit prepare -p notify-gitlab

Configure

{
  projectId: string;
  privateToken: string;
  gitlabUrl?: string;
  commentTo?: "note" | "description" | "discussion";
}
  • projectId - Required - Your GitLab project id. You can get this id via https://gitlab.com/<your-name>/<your-project-name/edit> page.
  • privateToken - Required - Your GitLab API token. If you want more detail, see Personal access tokens doc.
  • gitlabUrl - Optional - Set if you host your GitLab instance. Default: https://gitlab.com
  • commentTo - Optional - How this plugin comments to MR. If "note", it posts or puts the comment as a MR's note. if "description", your MR's description gets updated. If "discussion", it posts or puts the comment as a MR's resolvable note. Default: "note".

Auto complete on GitLab CI

If you run reg-suit on GitLab CI, this plugin detect gitlabUrl and projectId values from pre-declared GitLab CI environment values. So you can skip projectId