0.2.12 • Published 10 months ago

semantic-release-githubsquash v0.2.12

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

semantic-release-githubsquash

A tiny wrapper for commit-analyzer and release-notes-generator which works with squashed pull requests.

A big thank you to semantic-release-unsquash. This repository is a fork of the original project, modified to look at the body of a pull request to look for semantic-release commit signatures.

The idea with this wrapper is to allow for a headline as a commit message and use the body for all the semantic versioning messages.

npm latest version

Install

$ npm install -D semantic-release-githubsquash

Usage

The plugin does not have it`s own configuration, but it passes configuration to wrapped plugins

{
  "plugins": [
    ["semantic-release-unsquash", {
      "commitAnalyzerConfig": {
        "preset": "angular",
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
        }
      },
      "notesGeneratorConfig": {
        "preset": "angular",
        "parserOpts": {
          "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
        },
        "writerOpts": {
          "commitsSort": ["subject", "scope"]
        }
      }
    }]
  ]
}

Usage with Github

When you create squash commit in Github, you create a commit message where you have a subject and a body. GitHub adds the number of the pull request into the subject, so when you apply it to the target branch, this commit message looks like this:

My foobar subject message with pull request number (#56)

The rest of the commit message in the body

If you want to use semantic versioning, but want to keep the headline you can do the following:

My foobar subject message with pullrequest number (#56)

fix(System): The rest of the commit message in the body

If you are using this plugin, it will remove the headline from the commit message before the analysers see them, so what they see will be:

fix(System): The rest of the commit message in the body

triggering the semantics. It does this for all the commits that the analyzers considers.

0.2.12

10 months ago

0.2.11

10 months ago

0.2.10

10 months ago

0.2.9

10 months ago

0.2.8

10 months ago

0.2.7

10 months ago

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago