
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://godoc.org/github.com/mvisonneau/gitlab-merger?status.svg](https://godoc.org/github.com/mvisonneau/gitlab-merger) https://goreportcard.com/badge/github.com/mvisonneau/gitlab-merger](https://goreportcard.com/report/github.com/mvisonneau/gitlab-merger) https://img.shields.io/docker/pulls/mvisonneau/gitlab-merger.svg](https://hub.docker.com/r/mvisonneau/gitlab-merger/) https://cloud.drone.io/api/badges/mvisonneau/gitlab-merger/status.svg](https://cloud.drone.io/mvisonneau/gitlab-merger) https://coveralls.io/repos/github/mvisonneau/gitlab-merger/badge.svg?branch=master](https://coveralls.io/github/mvisonneau/gitlab-merger?branch=master)
gitlab-merger allows you to generate merge requests that can be used for release review and notification purposes.
The current implementation of this project is very opinionated but I am very open to make it more generic. It also only runs on GitLab Enterprise with a license >= starter/bronze.
bash# Trigger it from wherever you want, I personally have a manual CI job at the end of a dev branch which allow me to trigger # dev -> master merge requests gitlab-merger \ --log-level debug \ --gitlab-url https://gitlab.com \ --gitlab-token xxxx \ merge \ --source-ref foo \ --target-ref bar \ --project 'foo/bar' \ --slack-channel '#random' \ --slack-token 'xoxp-xxx-xxxx-xxxx-xxxxxxx' INFO[2020-06-09T16:47:55+02:00] checking existing merge requests.. INFO[2020-06-09T16:47:55+02:00] no open MR found, comparing refs.. INFO[2020-06-09T16:47:56+02:00] found differences between refs commit-count=1 DEBU[2020-06-09T16:47:56+02:00] Found current user ID: 1 DEBU[2020-06-09T16:47:56+02:00] found existing snippet snippet-id=1 DEBU[2020-06-09T16:47:56+02:00] loading content from snippet snippet-id=1 INFO[2020-06-09T16:47:56+02:00] done matching committers in GitLab committer-count=1 INFO[2020-06-09T16:47:56+02:00] found GitLab user email=maxime@sphere.me gitlab-user-id=1 INFO[2020-06-09T16:47:57+02:00] merge request created merge-request-id=1 merge-request-url="https://gitlab.com/foo/bar/-/merge_requests/1" INFO[2020-06-09T16:47:57+02:00] notifying slack channel about the new MR slack-channel="#test" DEBU[2020-06-09T16:47:57+02:00] exiting.. execution-duration=2.45031955s
Here is the MR you would get
!gitlab-mr
And as I specified some Slack configuration, every contributor gets notified over the defined channel as well (this is optional):
!slack-message
Have a look onto the https://github.com/mvisonneau/gitlab-merger/releases/latest and pick your flavor.
bash~$ go get -u github.com/mvisonneau/gitlab-merger
bash~$ brew install mvisonneau/tap/gitlab-merger
bash~$ docker run -it --rm mvisonneau/gitlab-merger
bash~$ scoop bucket add https://github.com/mvisonneau/scoops ~$ scoop install gitlab-merger
For the following ones, you need to know which version you want to install, to fetch the latest available :
bash~$ export GITLAB_MERGER_VERSION=$(curl -s "https://api.github.com/repos/mvisonneau/gitlab-merger/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
bash# Binary (eg: linux/amd64) ~$ wget https://github.com/mvisonneau/gitlab-merger/releases/download/${GITLAB_MERGER_VERSION}/gitlab-merger_${GITLAB_MERGER_VERSION}_linux_amd64.tar.gz ~$ tar zxvf gitlab-merger_${GITLAB_MERGER_VERSION}_linux_amd64.tar.gz -C /usr/local/bin # DEB package (eg: linux/386) ~$ wget https://github.com/mvisonneau/gitlab-merger/releases/download/${GITLAB_MERGER_VERSION}/gitlab-merger_${GITLAB_MERGER_VERSION}_linux_386.deb ~$ dpkg -i gitlab-merger_${GITLAB_MERGER_VERSION}_linux_386.deb # RPM package (eg: linux/arm64) ~$ wget https://github.com/mvisonneau/gitlab-merger/releases/download/${GITLAB_MERGER_VERSION}/gitlab-merger_${GITLAB_MERGER_VERSION}_linux_arm64.rpm ~$ rpm -ivh gitlab-merger_${GITLAB_MERGER_VERSION}_linux_arm64.rpm
bash~$ gitlab-merger NAME: gitlab-merger - Automate your MR creation USAGE: gitlab-merger [global options] command [command options] [arguments...] COMMANDS: merge refs together refresh users list help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --log-level level log level (debug,info,warn,fatal,panic) (default: "info") [$GLM_LOG_LEVEL] --log-format format log format (json,text) (default: "text") [$GLM_LOG_FORMAT] --gitlab-url url url [$GLM_GITLAB_URL] --gitlab-token token token [$GLM_GITLAB_TOKEN] --help, -h show help --version, -v print the version
In order to figure out which commit is being made by which GitLab user and get this data in a efficient fashion, we store this value into a snippet. It will be automatically created if it does not exists but you can manually refresh it using the following command
bashgitlab-merger refresh gitlab-users
In order to map out which GitLab users with Slack users, you can use the following command:
bashgitlab-merger refresh slack-users
It will store the mapping under the same snippet as the email/gitlab mappings
If you use docker, you can easily get started using :
bash~$ make dev-env # You should then be able to use go commands to work onto the project, eg: ~docker$ make fmt ~docker$ gitlab-merger
This command will spin up a container with everything required in terms of golang dependencies to get started.
If you want to build and/or release your own version of gitlab-merger, you need the following prerequisites :
bash~$ git clone git@github.com:mvisonneau/gitlab-merger.git && cd gitlab-merger # Build the binaries locally ~$ make build # Build the binaries and release them (you will need a GITHUB_TOKEN and to reconfigure .goreleaser.yml) ~$ make release
Contributions are more than welcome! Feel free to submit a https://github.com/mvisonneau/gitlab-merger/pulls.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务