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 🙏

© 2024 – Pkg Stats / Ryan Hefner

branch-merge-cli

v0.4.1

Published

## 什么是 branch-merge-cli? 旨在提高处理反向合并流程的效率,通过批量执行一系列步骤,简化反向合并过程。

Downloads

23

Readme

branch-merge-cli

什么是 branch-merge-cli?

旨在提高处理反向合并流程的效率,通过批量执行一系列步骤,简化反向合并过程。

做什么

  • 自动创建修复分支: 根据指定的发布版本(release-xxx)或主分支(master),自动批量创建本地修复分支。
  • 批量进行 cherry-pick,基于研发人员提供的修复 commit-id 或者 fix-branch,应用到所有修复分支上。
  • 自动生成 Merge Request(MR): 并自动关联修复分支和目标版本,指派给指定的审核人员。
  • 二次推送 push:当 MR 已经生成后,又有修复的 commit,可以通过 push 命令进行二次推送,无须重新创建 MR。
  • 分支清理: 在MR被合并后,支持删除相关的本地和远程修复分支,以保持代码库的整洁性。

不做什么

  • 不能替代研发自动修复 bug
  • 不能替代研发自动解决合并冲突

开始

安装

需要安装 node 环境,版本 >= 12

下载 branch-merge-cli

npm install -g branch-merge-cli

在 git 全局忽略文件中增加 branch-merge-cli.config.js

git config --global core.excludesfile ~/.gitignore_global
echo "branch-merge-cli.config.js" >> ~/.gitignore_global

使用方式

  1. 打开终端
  2. 切换到本地目标仓库地址
  3. bm-cli init,生成本地配置文件 branch-merge-cli.config.js,更新配置文件中的属性
  4. bm-cli -b,批量创建本地分支
  5. bm-cli -c,批量 cherry-pick 到目标本地分支,有冲突请自行解决
  6. bm-cli -m,批量创建 MR

参数说明

Usage: bm-cli [options] [command] |

| Commands | Description | |------------|-----------------| | init | 初始化配置文件 |

| options | Description |
|-----------|-----------------------------------------|
| -V | output the version number |
| -b | 按命名规则创建本地分支 |
| -c | cherry-pick 到目标本地分支 |
| -d [type] | 删除分支,type 可选,可以是 all(全部)或 remote(远程),默认为 local(本地) |
| -m | 创建远程 MR |
| -p | 推送到远程仓库 |
| -h | display help for command |