This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

danger-plugin-conventional-commitlint-gitlab-mr
TypeScript icon, indicating that this package has built-in type declarations

3.1.2 • Public • Published

danger-plugin-conventional-commitlint-gitlab-mr

Build Status npm version semantic-release

This plugin checks a MR properties & It ensures that the MR title and the commmit messages follow the conventional commit lint rules..

Here are the conditions :

If MR sqash flag is true & multiple commits - title must be correct

If MR sqash flag is false & multiple commits - at least one commit must be correct

if single commit - first commit line must be correct

Rules

Usage

This plugin has been created especially for GITLAB and is supposed to be integrated in a CI job. It will not work for GitHub__

Install (with yarn or npm):

npm install --save-dev  danger-plugin-conventional-commitlint-gitlab-mr 

At a glance:

If you dangerfile is located in a module-like folder, it will look like this :

// dangerfile.js
import check from 'danger-plugin-conventional-commitlint-gitlab-mr'

import configConventional from '@commitlint/config-conventional';

(async function dangerReport() {

  const commitlintConfig = {
    severity: 'warn'
  };
  await check(configConventional.rules, commitlintConfig);
})();

If you get an isssue related to the import statement, try this:

In your project root folder :

  • Create a sub folder
  • Create a dangerfile.js inside of it
const commitlint = require('danger-plugin-conventional-commitlint-gitlab-mr')
const configConventional = require('@commitlint/config-conventional')

;(async function dangerReport() {
  const commitlintConfig = {
    severity: 'fail',
  }
  await commitlint.default(configConventional.rules, commitlintConfig)
})()

-- You will need to install a few dependencies for the plugin to work :

 run npm init
npm i commitlint/lint@8.3.5
npm i commitlint/config-conventional@13.1.0
npm install --save-dev  danger-plugin-conventional-commitlint-gitlab-mr 

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Package Sidebar

Install

npm i danger-plugin-conventional-commitlint-gitlab-mr

Weekly Downloads

0

Version

3.1.2

License

MIT

Unpacked Size

97.8 kB

Total Files

22

Last publish

Collaborators

  • anderwansam