项目作者: evelynhathaway

项目描述 :
👆⛔ A drop-in replacement for @semantic-release/commit-analyzer that fails when no release is made
高级语言: JavaScript
项目地址: git://github.com/evelynhathaway/commit-analyzer-fail-on-no-release.git
创建时间: 2021-05-18T22:13:17Z
项目社区:https://github.com/evelynhathaway/commit-analyzer-fail-on-no-release

开源协议:MIT License

下载




Icon

# Commit Analyzer Fail on No Release

A drop-in replacement for @semantic-release/commit-analyzer that fails when no release is made

npm version
check status
license: MIT

Description

If you need your pipelines to fail if no release will be created with semantic-release, drop this plugin into your config.

Installation

  1. npm install --save-dev commit-analyzer-fail-on-no-release

Usage

In your semantic-release configuration file, replace the default commit analyzer with commit-analyzer-fail-on-no-release. All configuration options pass through to the default plugin.

release.config.mjs

  1. export default {
  2. plugins: [
  3. [
  4. - "@semantic-release/commit-analyzer",
  5. + "commit-analyzer-fail-on-no-release",
  6. {
  7. "preset": "angular",
  8. "releaseRules": [
  9. {"type": "docs", "scope": "README", "release": "patch"},
  10. {"type": "refactor", "release": "patch"},
  11. {"type": "style", "release": "patch"},
  12. ],
  13. "parserOpts": {
  14. "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"],
  15. },
  16. },
  17. ],
  18. ],
  19. };

Development

Testing

Make a either a no commit, a typed commit that will release, or one that won’t and then see if the error was thrown if
expected while running a dummy dry-run release.

  1. npm link
  2. npm link commit-analyzer-fail-on-no-release
  3. npm run test-release

License

Copyright Evelyn Hathaway, MIT License