gitbeaker/scripts/auto-before-commit-changelog-plugin.js
Justin Dalrymple 0255a0e82f
Package Registry Support (#1822)
* Adding support for Package Registry API
2021-06-07 16:22:00 -04:00

21 lines
463 B
JavaScript

/* eslint-disable */
const { execPromise } = require('@auto-it/core');
module.exports = class LintDocsPlugin {
constructor() {
this.name = 'Linting Docs';
}
/**
* Setup the plugin
*
* @param {import('@auto-canary/core').default} auto
*/
apply(auto) {
auto.hooks.beforeCommitChangelog.tapPromise(this.name, async () => {
await execPromise('yarn', ['lint:docs:fix']);
await execPromise('git', ['add', '.']);
});
}
};