Skip to content

Forms release changelog and posts a note to each referenced issues after semantic release publishes a new module version

Notifications You must be signed in to change notification settings

bahmutov/github-post-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-post-release

Forms release changelog and posts a note to each referenced issues after semantic release publishes a new module version

NPM

Build status semantic-release js-standard-style next-update-travis badge

Problem

When publishing new version of your NPM package, it would be nice to comment on each GitHub issue referenced by the semantic commits, letting the user know that the fix / feature was published.

This module works as a semantic-release generate notes plugin. It both comments on referenced issues and returns the changelog to be posted on GitHub. Each issue will get a comment like this (example)

Typical comment

Install and use

Requires Node version 6 or above.

npm install --save-dev github-post-release

The postinstall script will automatically set this module to be the generateNotes plugin for the release. If you want you can do this manually:

{
  "release": {
    "generateNotes": "github-post-release"
  }
}

Message types

By default, the output message for issues will be "New version has been published to NPM ...". This might not match other scenarios when this plugin can be used. For example if you deploy a website and publish release notes to GitHub, you might like different text that does not mention NPM. There are two built-in message types: "npm", "deploy" and you can pick on to generate by configuring this plugin like this in package.json

{
  "release": {
    "generateNotes": {
      "path": "github-post-release",
      "type": "deploy"
    }
  }
}

Debug

To see more log messages, run this plugin with DEBUG=github-post-release flag. You can even demo the plugin locally (without actual GitHub updates) using npm run demo.

Related

It was inspired by semantic-release-github-notifier, release-notes-generator and uses conventional-changelog to generate changelog text after commenting on issues.

Small print

Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2017

License: MIT - do anything with the code, but don't blame me if it does not work.

Support: if you find any problems with this module, email / tweet / open issue on Github

MIT License

Copyright (c) 2017 Gleb Bahmutov <gleb.bahmutov@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Forms release changelog and posts a note to each referenced issues after semantic release publishes a new module version

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published