gitbeaker/scripts/auto-before-commit-changelog-plugin.js
Justin Dalrymple 7f1648802b Major Release v36.0.0 - Improved Typing, and API support (16.0) (#2258)
Adding extensive typing support
Unified browser and Node.JS implementations
Adding support of Gitlab API 16.0
2023-04-26 12:58:56 -04:00

22 lines
507 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:fix']);
await execPromise('yarn', ['format:fix']);
await execPromise('git', ['add', '.']);
});
}
};