Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

semantic-release-github-notifier

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semantic-release-github-notifier

semantic-release-github plugin that notifies GitHub issues and pull requests of a related package release.

  • 7.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
332
increased by61.17%
Maintainers
1
Weekly downloads
 
Created
Source

semantic-release-github-notifier

semantic-release-github plugin to post comments to GitHub issues closed by changes included in a package release.

A comment is posted to each issue that has been closed by a change included in a release of your package.

The message that will be posted says: Version [THE VERSION RELEASED] has been released.

Table of Contents

  • Installation
  • Usage
  • Debugging
  • Node Support Policy
  • Contributing

Installation

To install the semantic-release-github-notifier plugin for use in your own package publishing tool please run the following command:

yarn add [--dev] semantic-release-github-notifier

Usage

semantic-release-github-notifier, when called, returns a promise.

It takes one parameter, a configuration object, that contains options that alter its behavior, and data needed to create issue comments.

const notifier = require(`semantic-release-github-notifier`);

const config = {};

notifier(config)
  .then(() => { /* Comments, if any, have been successfully posted to GitHub. */ })
  .catch(() => { /* Do any exception handling here. */ });

Configuration

The config object passed to semantic-release-github-notifier, as shown in the example above, must have the following properties:

  • pkg
  • options
  • data
pkg

A copy of the to-be-released project's package.json file. This must include a repository property with the path to the project's git repository on GitHub. Please see npm's documentation on the format of the repository field. The repository field is parsed by git-pkg-repo, supporting many formats, including HTTPS and SSH.

options

options is an object with the following properties:

  • dryRun
  • monoRepo
  • scmToken
  • tagSplitter
dryRun

Default: false

Set to true to enable dry run. When conducting a dry run all configuration options and commits will be validated, but no comments will be posted to GitHub.

Conducting a dry run serves a different purpose than what's served by the Debugging section below.

monoRepo

Default: false

Set to true to enable mono repository support. Mono repositories are those that contain two or more packages within a single git repository. Mono repositories typically use tags in the form of package-name@1.0.0 for individual packages, allowing each package to have their own independent set of versions.

scmToken

An authentication token with access to the to-be-released project so that comments can be posted to the project's issues.

Authentication Requirements

The authentication token must belong to a user or service account that has permission to post comments to the project.

tagSplitter

Default: @

This is an optional property used when the monoRepo option is set to true. tagSplitter allows you to specify a different character that separates the package name from the package's version in the git tag name. For example, to support package-name#1.0.0, set tagSplitter to #.

data

data is an object with the following properties:

commits

An array containing each commit's message in the form of a string.

version

A string that's a valid semantic version representing the version that has been released.

Debugging

To assist users of the semantic-release-github-notifier plugin with debugging the behavior of this module we use the debug utility package to print information about the release process to the console. To enable debug message printing, the environment variable DEBUG, which is the variable used by the debug package, must be set to a value configured by the package containing the debug messages to be printed.

To print debug messages on a unix system set the environment variable DEBUG with the name of this package prior to executing a tool that invokes this plugin:

DEBUG=semantic-release-github-notifier [RELEASE TOOL]

On the Windows command line you may do:

set DEBUG=semantic-release-github-notifier
[RELEASE TOOL]

All semantic-release-github plugins use debug to print information to the console. You can instruct all plugins, and semantic-release-github, to print their debug information by using semantic-release-github* as the value of the DEBUG environment variable.

DEBUG=semantic-release-github* [RELEASE TOOL]

Node Support Policy

We only support Long-Term Support versions of Node.

We specifically limit our support to LTS versions of Node, not because this package won't work on other versions, but because we have a limited amount of time, and supporting LTS offers the greatest return on that investment.

It's possible this package will work correctly on newer versions of Node. It may even be possible to use this package on older versions of Node, though that's more unlikely as we'll make every effort to take advantage of features available in the oldest LTS version we support.

As each Node LTS version reaches its end-of-life we will remove that version from the node engines property of our package's package.json file. Removing a Node version is considered a breaking change and will entail the publishing of a new major version of this package. We will not accept any requests to support an end-of-life version of Node. Any merge requests or issues supporting an end-of-life version of Node will be closed.

We will accept code that allows this package to run on newer, non-LTS, versions of Node. Furthermore, we will attempt to ensure our own changes work on the latest version of Node. To help in that commitment, our continuous integration setup runs against all LTS versions of Node in addition the most recent Node release; called current.

JavaScript package managers should allow you to install this package with any version of Node, with, at most, a warning if your version of Node does not fall within the range specified by our node engines property. If you encounter issues installing this package, please report the issue to your package manager.

Contributing

Please read our contributing guide on how you can help improve this project.

Keywords

FAQs

Package last updated on 19 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc