{"id":31727232,"url":"https://github.com/alfonsxh/gitlab-merge-alert-go","last_synced_at":"2026-04-12T23:46:37.702Z","repository":{"id":316039020,"uuid":"1009998680","full_name":"Alfonsxh/gitlab-merge-alert-go","owner":"Alfonsxh","description":"GitLab MR to WeChat Work notification bridge | 企业微信通知","archived":false,"fork":false,"pushed_at":"2025-09-29T11:07:37.000Z","size":1117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T12:29:57.172Z","etag":null,"topics":["gitlab","merge-request","webhook","wechat-work"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alfonsxh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-28T06:05:02.000Z","updated_at":"2025-09-29T11:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"862c3fff-5ad1-4dac-b321-b1ed8402813d","html_url":"https://github.com/Alfonsxh/gitlab-merge-alert-go","commit_stats":null,"previous_names":["alfonsxh/gitlab-merge-alert-go"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Alfonsxh/gitlab-merge-alert-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfonsxh%2Fgitlab-merge-alert-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfonsxh%2Fgitlab-merge-alert-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfonsxh%2Fgitlab-merge-alert-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfonsxh%2Fgitlab-merge-alert-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alfonsxh","download_url":"https://codeload.github.com/Alfonsxh/gitlab-merge-alert-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfonsxh%2Fgitlab-merge-alert-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000850,"owners_count":26082950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitlab","merge-request","webhook","wechat-work"],"created_at":"2025-10-09T06:19:27.691Z","updated_at":"2026-04-12T23:46:37.671Z","avatar_url":"https://github.com/Alfonsxh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitLab Merge Alert\n\n[English](#) | [简体中文](README_zh.md)\n\n![Go Version](https://img.shields.io/badge/go-1.23+-00ADD8?logo=go)\n![License](https://img.shields.io/badge/license-MIT-green)\n![Docker Pulls](https://img.shields.io/docker/pulls/alfonsxh/gitlab-merge-alert-go)\n![GitHub Stars](https://img.shields.io/github/stars/Alfonsxh/gitlab-merge-alert-go?style=social)\n[![Go Reference](https://pkg.go.dev/badge/github.com/Alfonsxh/gitlab-merge-alert-go.svg)](https://pkg.go.dev/github.com/Alfonsxh/gitlab-merge-alert-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Alfonsxh/gitlab-merge-alert-go)](https://goreportcard.com/report/github.com/Alfonsxh/gitlab-merge-alert-go)\n[![codecov](https://codecov.io/gh/Alfonsxh/gitlab-merge-alert-go/branch/main/graph/badge.svg)](https://codecov.io/gh/Alfonsxh/gitlab-merge-alert-go)\n\n**Instant GitLab merge request notifications in WeChat Work** - Never miss a code review again!\n\n## 🎯 What Problem Does It Solve?\n\nIf your team uses **GitLab** for code management but **WeChat Work (企业微信)** for daily communication, you've probably faced these issues:\n\n- 😴 **Missed Reviews** - MR notifications buried in emails nobody checks\n- 🌍 **Language Barrier** - GitLab notifications are English-only\n- 🔌 **No Native Integration** - GitLab supports Slack/Teams but not WeChat Work\n- ⏰ **Delayed Feedback** - Code reviews sit idle for hours or days\n\n**GitLab Merge Alert** bridges this gap with instant, localized notifications right where your team already communicates.\n\n## ✨ Key Features\n\n- 🚀 **5-Minute Setup** - Docker deployment with zero dependencies\n- 📱 **Native WeChat Work** - Direct robot webhook integration\n- 👥 **Smart @Mentions** - Auto-tag reviewers by phone number\n- 🎯 **Batch Import** - Import entire GitLab groups at once\n- 📊 **Built-in Analytics** - Track team review metrics\n- 🔐 **Enterprise Ready** - Admin panel, user management, access control\n- 🌐 **Works Everywhere** - GitLab.com or self-hosted instances\n\n## 🖼️ Screenshots\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cimg src=\"./docs/images/dashboard.png\" alt=\"Dashboard\" /\u003e\n      \u003cp align=\"center\"\u003e\u003cb\u003eAnalytics Dashboard\u003c/b\u003e\u003cbr/\u003eReal-time metrics and statistics\u003c/p\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"50%\"\u003e\n      \u003cimg src=\"./docs/images/batch-import.png\" alt=\"Batch Import\" /\u003e\n      \u003cp align=\"center\"\u003e\u003cb\u003eBatch Import\u003c/b\u003e\u003cbr/\u003eImport GitLab groups with one click\u003c/p\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## 🚀 Quick Start\n\n### Docker Deploy (Recommended)\n\n```bash\ndocker run -d \\\n  --name gitlab-merge-alert \\\n  -p 1688:1688 \\\n  -v $(pwd)/data:/app/data \\\n  -e GMA_GITLAB_URL=\"https://gitlab.com\" \\\n  -e GMA_PUBLIC_WEBHOOK_URL=\"https://your-domain.com\" \\\n  -e GMA_ENCRYPTION_KEY=\"your_32_character_encryption_key\" \\\n  -e GMA_JWT_SECRET=\"your_strong_jwt_secret\" \\\n  --restart always \\\n  alfonsxh/gitlab-merge-alert-go:latest\n```\n\n### Initial Setup\n\n1. **Access Admin Panel**: Navigate to `http://localhost:1688`\n2. **Get Setup Token**: Check container logs for one-time admin token\n   ```bash\n   docker logs gitlab-merge-alert | grep \"Admin setup token\"\n   ```\n3. **Create Admin**: Visit `/setup-admin`, enter token and credentials\n4. **Configure**: Add GitLab projects, WeChat Work webhooks, and user mappings\n\n## ⚙️ Configuration\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `GMA_GITLAB_URL` | GitLab instance URL | Required |\n| `GMA_PUBLIC_WEBHOOK_URL` | Public URL for webhooks | Required |\n| `GMA_PORT` | Service port | `1688` |\n| `GMA_DATABASE_PATH` | SQLite database path | `/data/gitlab-merge-alert.db` |\n| `GMA_ENCRYPTION_KEY` | 32-char encryption key | Auto-generated |\n| `GMA_JWT_SECRET` | JWT signing key | Auto-generated |\n| `GMA_JWT_DURATION` | Token validity | `24h` |\n| `GMA_LOG_LEVEL` | Log level (debug/info/warn/error) | `info` |\n\n\u003e **Note:** `GMA_PUBLIC_WEBHOOK_URL` is the address where the GitLab Merge Alert service is deployed and accessible from GitLab. For example, if the service is deployed on node 192.168.1.63, set `GMA_PUBLIC_WEBHOOK_URL=http://192.168.1.63:1688`\n\n### WeChat Work Robot Setup\n\n1. Create a group in WeChat Work\n2. Add a group robot\n3. Copy the webhook URL\n4. Add to **GitLab Merge Alert** webhooks panel\n\n### Configuration Steps\n\n1. Login to **GitLab Merge Alert** web interface\n2. Register the first user时即填写 GitLab Personal Access Token（需具备 `api`/`read_api`/`read_user` 权限，系统会校验并加密存储）\n3. 若已有账户，仍可在 Settings 中更新 GitLab Token\n4. Add WeChat Work webhook URL to notification channels\n5. Add projects to monitor\n6. The system will automatically configure GitLab webhooks for each project\n\n## 📊 How It Works\n\n```mermaid\ngraph LR\n    A[GitLab MR Event] --\u003e B[GitLab Merge Alert]\n    B --\u003e C{Route by Project}\n    C --\u003e D[WeChat Work Robot 1]\n    C --\u003e E[WeChat Work Robot 2]\n    D --\u003e F[Mention Reviewers]\n    E --\u003e G[Mention Reviewers]\n```\n\n1. **GitLab** sends merge request events via webhook\n2. **Service** parses events and identifies target projects\n3. **Router** finds mapped WeChat Work webhook\n4. **Notifier** builds localized message with @mentions\n5. **WeChat Work** delivers notification to team\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Go 1.23+\n- Node.js 18+\n- Make\n\n### Build from Source\n\n```bash\n# Clone repository\ngit clone https://github.com/Alfonsxh/gitlab-merge-alert-go.git\ncd gitlab-merge-alert-go\n\n# Install dependencies\nmake install\n\n# Build backend + frontend binary\nmake build\n\n# Run\n./bin/gitlab-merge-alert-go\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📋 Roadmap\n\n- [ ] Multiple notification channels (DingTalk, Slack)\n- [ ] Custom message templates\n- [ ] Notification scheduling and filtering\n\n## ❓ FAQ\n\n**Q: Does it work with GitLab.com?**\nA: Yes, it works with both GitLab.com and self-hosted GitLab instances.\n\n**Q: Can I use multiple WeChat Work robots?**\nA: Yes, you can map different projects to different robots.\n\n**Q: Is it secure?**\nA: Yes, it features encrypted storage, JWT authentication, and webhook signature verification.\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n## 🙏 Acknowledgments\n\n- [GitLab](https://gitlab.com) for the amazing DevOps platform\n- [WeChat Work](https://work.weixin.qq.com) for enterprise communication\n- All contributors who help improve this project\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/Alfonsxh/gitlab-merge-alert-go/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Alfonsxh/gitlab-merge-alert-go/discussions)\n\n---\n\n**Keywords**: GitLab, WeChat Work, 企业微信, Merge Request, Code Review, Notification, Webhook, DevOps, Team Collaboration, GitLab Integration\n\n⭐ **If this project helps your team, please give it a star!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfonsxh%2Fgitlab-merge-alert-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfonsxh%2Fgitlab-merge-alert-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfonsxh%2Fgitlab-merge-alert-go/lists"}