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

@banana020/ci-dingtalk-notify

v1.0.2

Published

GitLab CI deploy notification via DingTalk robot webhook

Readme

ci-dingtalk-notify

GitLab CI 部署完成后,通过钉钉自定义机器人发送 Markdown 通知。

发布到 npm

首次使用前需发布到公共 npm(需先 npm login 注册/登录 npmjs.com):

npm publish

若包名 ci-dingtalk-notify 已被占用,可修改 package.jsonname@你的用户名/ci-dingtalk-notify,发布时加 --access public,并同步更新各项目 CI 中的 npx 命令。

在 GitLab CI 中使用

.deploy_notify:
  after_script:
    - |
      if [ "$CI_JOB_STATUS" = "canceled" ]; then exit 0; fi
      npx --yes [email protected]

deploy_staging:
  extends: .deploy_notify
  variables:
    DEPLOY_ENV: staging

GitLab Group 变量(配置一次,所有项目共享)

GitLab Group → Settings → CI/CD → Variables 添加:

| 变量名 | 说明 | 建议 | | ------ | ---- | ---- | | DINGTALK_ACCESS_TOKEN | 钉钉机器人 Webhook 中 access_token= 后的值 | Masked | | DINGTALK_SECRET | 机器人「加签」密钥 | Masked + Protected |

钉钉群:群设置 → 智能群助手 → 添加机器人 → 自定义 → 安全设置选「加签」。

若启用「自定义关键词」,消息标题含「部署通知」,关键词可设为 部署

自动读取的 CI 变量

| 展示字段 | 环境变量 | | -------- | -------- | | 分支 | CI_COMMIT_REF_NAME | | 推送人 | GITLAB_USER_NAME | | 结果 | CI_JOB_STATUS | | 项目 | CI_PROJECT_NAME | | 环境 | DEPLOY_ENV(各 job 自行设置) | | 提交说明 | CI_COMMIT_MESSAGE | | 流水线 | CI_PIPELINE_URL | | 耗时 | CI_JOB_STARTED_AT | | 提交作者 | CI_COMMIT_AUTHOR |

本地调试

export DINGTALK_ACCESS_TOKEN=xxx
export DINGTALK_SECRET=xxx
export CI_PROJECT_NAME=iamadmin
export CI_COMMIT_REF_NAME=dev
export GITLAB_USER_NAME=张三
export CI_JOB_STATUS=success
export DEPLOY_ENV=dev
export CI_COMMIT_MESSAGE="fix: test"
export CI_COMMIT_AUTHOR="李四"
export CI_PIPELINE_URL=https://gitlab.example.com/pipelines/1
export CI_JOB_STARTED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)

node bin/cli.mjs