1.0.1 • Published 5 years ago

@interaktiv/conventional-changelog-dia-bitbucket v1.0.1

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
5 years ago

conventional-changelog-dia-bitbucket

Conventional Changelog Preset used for Bitbucket Repos at DIA

Commitizen friendly semantic-release MIT License version

npm latest version npm next version

Issues with the convention itself should be reported on the angular issue tracker.

Background

The conventional-changelog-angular preset assumes that the repository is hosted on GitHub, but it will still work (with limited functionality) for non-GitHub repositories.

This preset aims to produce a change log that contains the correct formatting and links for BitBucket too.

It detects which git hosting provider is used and handles the templates etc. accordingly.

Differences to conventional-changelog-angular

  • Issue links are highlighted automatically by BitBucket e.g. #12345. But if there is a JIRA ticket reference like #EXM-123, then JIRA links will be generated

    Currently the JIRA host is statically defined in code

  • @-mentions are highlighted automatically by BitBucket

  • Commit links use a different format
  • Comparison links (between two versions) use a different format

Prerequisites

Installation

npm install --save-dev @interaktiv/conventional-changelog-dia-bitbucket

Usage

  1. Install the package in the project which will use it
  2. Set the preset to dia-bitbucket:
const changelog = require('conventional-changelog');
changelog({ preset: 'dia-bitbucket' });

Usage with semantic-release

.releaserc.js:

module.exports = {
  branch: 'master',
  plugins: [
    '@semantic-release/commit-analyzer',
    [
      '@semantic-release/release-notes-generator',
      {
        preset: 'dia-bitbucket',
      },
    ],
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/git',
  ],
};

Usage with corp-semantic-release

{
  "repository": {
    "type": "git",
    "url": "https://bitbucket.host.com/org/repo.git"
  },
  "bugs": {
    "url": "https://some.url/issues"
  },
  "scripts": {
    "semantic-release": "corp-semantic-release --changelogpreset dia-bitbucket"
  },
  "devDependencies": {
    "conventional-changelog-dia-bitbucket": "*",
    "corp-semantic-release": "6.2.0"
  }
}

Contributing

See CONTRIBUTING.md.

Acknowledgments

Thanks to stevemao who wrote conventional-changelog-angular.

Also special thanks to uglow who wrote conventional-changelog-angular-bitbucket that has served as a base for this one.

License

MIT Copyright © 2019-present die.interaktiven GmbH & Co. KG