npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

semantic-release-google-chat

v1.2.0

Published

A plugin for semantic-release which publish release notes in a Google Chat

Readme

semantic-release-google-chat

semantic-release plugin to send release notes to a Google Chat channel when the release succeeds.

| Step | Description | | ------------------ | ------------------------------------------------------------- | | verifyConditions | Check the webhookUrl option or GOOGLE_CHAT_WEBHOOK_URL variable | | success | Send a Google Chat message to notify of a new release. |

Installation

npm install semantic-release-google-chat --save-dev
# or
yarn add semantic-release-google-chat --dev

This plugin is using an incoming webhook to notify a Google Chat space. Here is some documentation to create one.

Usage

// .releaserc.json
{
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["semantic-release-google-chat", {
      "webhookUrl": "...",
      "title": "A new version has been released",
      "imageUrl": "http://...",
      "showContributors": false
    }]
  ]
}

| Variable | Details | Description | | --- | --- | --- | | webhookUrl or GOOGLE_CHAT_WEBHOOK_URL | required, url | The incoming webhook url of the channel to publish release notes to. | | title | optional, text | The title of the message. Default: A new version has been released | | imageUrl | optional, url | An image displayed in the message, next to the title. The image must be less than 200x200. | | showContributors | optional, boolean | Whether or not the contributors should be displayed in the message. Default: true |

Notes

  • webhookUrl is a property of the config object in .releaserc.json, and, GOOGLE_CHAT_WEBHOOK_URL is an environment variable. The config object can be useful to try the plugin, but most of the time, production environments prefers environment variables. You can use both, but not in the same time as it does not make sense. If you do define both, the config object overrides the environment variable.

  • IMPORTANT: The webhookUrl variable you can use within your plugin configuration is meant to be used only for test purposes. Because you don't want to publicly publish this url and do let the world know a way to send messages to your Google Chat channel, you will want to use the GOOGLE_CHAT_WEBHOOK_URL instead.

  • The default value for imageUrl is https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Gitlab_meaningful_logo.svg/144px-Gitlab_meaningful_logo.svg.png

  • The list of Contributors is built using the email associated with the commits (only the part before the "@" is kept). This list can be disable (mainly for privacy reasons).

  • The message is sent to Google Chat during the success step which is silenced in dryRun mode.

  • The official @semantic-release/git plugin may cause a second message to be sent (because the plugin potentially adds a commit on the current branch, to save changes in files like package.json, package-lock.json, CHANGELOG.md). In order to prevent that, an environment variable (HAS_PREVIOUS_SEM_REL_EXECUTION) is set to true after the first message, then this plugin won't send any other message, as long as the plugin is part of the config.

Screenshots

preview

Development

Here are some steps to test the plugin locally:

  • checkout the source code:
    git clone [email protected]:jontey/semantic-release-google-chat.git
    cd semantic-release-google-chat
    npm install
  • add a .releaserc.json file at the project's root, copy the code from the Usage section in this new file using the webhookUrl property, and add the following properties in the object:
    "ci": false,
    "dryRun": true,
  • open index.js and replace module.exports = { verifyConditions, success }; by module.exports = { verifyConditions, generateNotes: success }; to allow the publication within the dryRun mode
  • run semantic-release locally safely:
    npm link
    npm link semantic-release-google-chat
    ./node_modules/.bin/semantic-release

Dependencies

Greatly inspired by semantic-release-slack-bot and semantic-release-ms-bot