This package has been deprecated

    Author message:

    This package has been deprecated. Its functionality has been moved into semantic-release-gitlab. If you would like this functionality as a separate package, please let us know on the semantic-release-gitlab issue tracker.

    semantic-release-gitlab-notifier

    8.1.2 • Public • Published

    semantic-release-gitlab-notifier

    semantic-release-gitlab plugin to post comments to GitLab 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

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

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

    Usage

    semantic-release-gitlab-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-gitlab-notifier`);
     
    const config = {};
     
    notifier(config)
      .then(() => { /* Comments, if any, have been successfully posted to GitLab. */ })
      .catch(() => { /* Do any exception handling here. */ });

    Required GitLab CE/EE Edition

    Version 9.0, or higher, of GitLab CE/EE is required for semantic-release-gitlab-notifier.

    Core features used:

    This only applies to you if you're running your own instance of GitLab. GitLab.com is always the latest version of the GitLab application.

    Configuration

    The config object passed to semantic-release-gitlab-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 GitLab. 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 account associated with the authentication token must have Guest permissions on the project so that this plugin may use the Leave comments action, as documented on the GitLab Permissions site.

    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-gitlab-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-gitlab-notifier [RELEASE TOOL]

    On the Windows command line you may do:

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

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

    DEBUG=semantic-release-gitlab* [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

    Install

    npm i semantic-release-gitlab-notifier

    DownloadsWeekly Downloads

    129

    Version

    8.1.2

    License

    Apache-2.0

    Unpacked Size

    24.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • hutson