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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chenlu0928/git-change-notifier

v1.0.0-beta.2

Published

Git change notification tool for DingTalk

Readme

Git Change Notifier

一个基于钉钉的 Git 代码变更通知工具,可以自动在代码推送时发送变更通知。

特性

  • 🚀 自动检测代码变更
  • 📝 支持自定义通知模板
  • 🔧 简单易用的配置
  • 🎨 美观的 Markdown 格式通知
  • 🔒 支持钉钉安全设置(签名)
  • 🎯 智能识别测试和生产环境

安装

npm install -g git-change-notifier

快速开始

  1. 在你的项目中初始化:
cd your-project
git-notify init
  1. 编辑配置文件 .git-notify.js,添加钉钉机器人的 webhook:
module.exports = {
  project: {
    name: "你的项目名",
    test: {
      branch: "test",
      webhook: "你的测试环境钉钉 webhook"
    },
    prod: {
      branch: "master",
      webhook: "你的生产环境钉钉 webhook"
    }
  }
}
  1. 推送代码测试:
git push

配置说明

基础配置

  • project.name: 项目名称
  • project.test.branch: 测试分支名称
  • project.test.webhook: 测试环境钉钉 webhook
  • project.prod.branch: 生产分支名称
  • project.prod.webhook: 生产环境钉钉 webhook

通知模板

可以自定义通知的标题和内容模板,支持以下变量:

  • ${project}: 项目名称
  • ${user}: 提交者信息
  • ${branch}: 分支名称
  • ${env}: 环境(test/prod)
  • ${mergeInfo}: 合并信息(如果是合并提交)
  • ${files}: 变更文件列表

命令

  • git-notify init: 初始化配置
  • git-notify notify: 手动触发通知

钉钉机器人配置

  1. 在钉钉群中添加自定义机器人
  2. 配置安全设置(推荐使用"加签"方式)
  3. 复制 webhook 地址到配置文件

常见问题

1. 如何在不同环境使用不同的通知模板?

可以在配置文件中为不同环境设置不同的模板:

module.exports = {
  notification: {
    templates: {
      test: {
        title: "测试环境 - ${project}",
        body: "..."
      },
      prod: {
        title: "生产环境 - ${project}",
        body: "..."
      }
    }
  }
}

2. 如何禁用某些分支的通知?

只需要不配置对应环境的 webhook 即可。

3. 通知没有发送?

  • 检查 webhook 是否正确配置
  • 确认当前分支是否匹配配置的环境分支
  • 检查是否有代码变更

贡献

欢迎提交 Issue 和 Pull Request!

许可

MIT ## 测试钉钉通知功能

这是一个测试提交,用于测试代码变更通知功能。