承接 git-automerge/php-automerge 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

git-automerge/php-automerge

Composer 安装命令:

composer require git-automerge/php-automerge

包简介

CLI tool to auto-merge git branches and tag.

README 文档

README

AutoMerge is a CLI tool to automate merging multiple remote Git branches into a temporary branch, tagging that branch with an environment-specific tag, pushing the tag to origin, and cleaning up afterward.

Features

  • Reads configuration from a YAML file defining multiple environments
  • Supports wildcard patterns for included remote branches to merge
  • Creates a temporary branch from a base branch before merging
  • Tags the merge commit with an environment name and timestamp
  • Pushes the tag to the remote repository
  • Automatically cleans up the temporary branch and local tag
  • Supports optional customizable tag prefix per environment

Installation

Install via Composer:

(Optional) Add post script to create symlink

"scripts": {
  "post-install-cmd": [
    "[ -L automerge ] || ln -s vendor/bin/automerge automerge"
  ],
  "post-update-cmd": [
    "[ -L automerge ] || ln -s vendor/bin/automerge automerge"
  ]
}
composer global require git-automerge/php-automerge

(Optional) create symlink

ln -s vendor/bin/automerge automerge

Usage

vendor/bin/automerge

Configuration Example (automerge-config.yaml)

Create a automerge-config.yaml file in your project root with this structure:

staging:
  base: main
  branches:
    - "bugfix/*"
  tag_prefix: "prod-"      # Optional; Default is "automerge-" if empty or false, no prefix used

feature:
  base: develop
  branches:
    - "feature/*"
  tag_prefix: false # omitted here; no prefix will be used

The script will:

  • Check your working directory is clean.
  • Fetch all remote branches.
  • Create a temporary branch from the base branch.
  • Merge all matching remote branches.
  • Tag the commit with a timestamp and environment name.
  • Push the tag to the remote.
  • Clean up local temporary branch and tag, and restore your original branch.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-14