返回顶部
A

AtomGit-CurlAtomGit-Curl集成

AtomGit (GitCode) 代码托管平台集成 - Curl/Bash 版本。完整支持 PR 审查、批准、合并、仓库管理、Issues 管理。特色功能:批量并行处理、文件树查看、PR 检查触发、CI 流水线检查、仓库协作管理。跨平台:Windows(Git Bash)/Linux/macOS。提供 36 个核心命令。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 3.0.4
安全检测
已通过
184
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

AtomGit-Curl

当何时使用

当任务涉及 AtomGit/GitCode 平台的 Pull Request 审查、批准、合并、仓库管理等操作时使用。

适用场景:

  • - ✅ Windows (Git Bash) / Linux / macOS 环境
  • ✅ 需要完整 API 功能
  • ✅ Shell 脚本集成
  • ✅ 无 PowerShell 环境
  • ✅ 批量处理 PR
  • ✅ CI/CD 流水线集成

不适用场景:

  • - ❌ 原生 CMD/PowerShell 环境 (需 Git Bash)
  • ❌ 无 bash 环境

🔒 安全特性

ClawHub High Confidence 级别

本技能已通过 ClawHub 安全扫描,达到 High Confidence 级别:

  • - ✅ sandbox: 在沙箱环境中运行
  • inputValidation: 所有输入参数都经过验证
  • errorHandling: 完善的错误处理机制
  • tokenHandling: Token 安全存储和脱敏显示
  • pathValidation: 路径注入防护
  • rateLimiting: API 请求速率限制
  • commandInjection: 无命令注入风险 (不使用 eval/exec)
  • sslVerification: 强制 SSL/TLS 验证
  • apiEndpointValidation: API 端点验证

安全最佳实践

  1. 1. Token 安全: 从环境变量或配置文件加载,不硬编码
  2. 输入验证: Owner/Repo/PR 编号都经过正则验证
  3. 错误处理: 过滤敏感信息,不泄露 Token
  4. SSL 验证: 所有 API 请求强制 HTTPS
  5. 超时控制: API 请求 30 秒超时,防止挂起

📦 安装说明

脚本文件位置: scripts/ 目录

安装步骤

  1. 1. 从 ClawHub 安装技能 (自动完成)
  1. 2. 设置执行权限:
bash

进入技能目录

cd ~/.openclaw/workspace/skills/atomgit-curl

设置执行权限

chmod +x scripts/atomgit.sh chmod +x scripts/atomgit-check-ci.sh

验证

ls -la scripts/
  1. 3. 验证安装:
bash

查看帮助

./scripts/atomgit.sh help

或使用别名

alias atomgit=./scripts/atomgit.sh atomgit help

文件说明

文件说明
scripts/atomgit.sh主执行脚本 (包含所有命令)
scripts/atomgit-check-ci.sh
CI 检查脚本 (流水线状态检查) |

快速参考

主题文件
使用指南README.md
命令参考
README.md#命令列表 | | API 参考 | API-REFERENCE.md | | API 文档 | 官方文档 |

💡 使用示例

场景 1: 查询需要处理的 PR

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

查询开放 PR

./atomgit.sh pr-list openeuler release-management open

查询 PR 详情

./atomgit.sh pr-detail openeuler release-management 2547

检查评论

curl -H Authorization: Bearer $ATOMGIT_TOKEN \ https://api.atomgit.com/api/v5/repos/openeuler/release-management/pulls/2547/comments

场景 2: 批量批准 PR

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

批量批准 (串行)

./atomgit.sh batch-approve openeuler release-management 2547 2564 2565

输出示例:

2547: Approved

2564: Approved

2565: Approved

场景 3: 检查 CI 状态

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

检查 CI 流水线

./atomgit.sh check-ci openeuler release-management 2564

输出示例:

=== AtomGit CI Check ===

Total: 10

Success: 9

Failure: 1

Overall: FAILED

场景 4: 创建 PR

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

创建 PR

./atomgit.sh create-pr openeuler release-management 添加新包 这个 PR 添加了新的软件包 feature/new-package main

场景 5: 协作管理

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

获取协作者列表

./atomgit.sh get-collabs openeuler release-management

添加协作者

./atomgit.sh add-collaborator openeuler release-management newuser push

移除协作者

./atomgit.sh remove-collaborator openeuler release-management olduser

场景 6: Issues 管理

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

获取 Issues 列表

./atomgit.sh issues-list openeuler release-management open

创建 Issue

./atomgit.sh create-issue openeuler release-management 发现 bug 详细描述...

添加评论

./atomgit.sh add-issue-comment openeuler release-management 123 这个问题已经修复

场景 7: 仓库查询

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

获取我的仓库

./atomgit.sh get-repos

获取仓库详情

./atomgit.sh repo-detail openeuler release-management

获取文件树

./atomgit.sh repo-tree openeuler release-management

获取文件内容

./atomgit.sh repo-file openeuler release-management README.md

场景 8: 其他查询

bash
cd ~/.openclaw/workspace/skills/atomgit-curl/scripts

获取标签列表

./atomgit.sh get-labels openeuler release-management

获取发布列表

./atomgit.sh get-releases openeuler release-management

获取 Webhooks 列表

./atomgit.sh get-hooks openeuler release-management

🎯 最佳实践

1. Token 安全

bash

✅ 推荐:使用环境变量


export ATOMGITTOKEN=YOURTOKEN

❌ 不推荐:硬编码在脚本中

TOKEN=YOUR_TOKEN # 不要提交到 Git

2. 批量处理

bash

✅ 推荐:使用批量命令


./atomgit.sh batch-approve openeuler release-management 2547 2564 2565

❌ 不推荐:循环调用

for pr in 2547 2564 2565; do ./atomgit.sh approve-pr openeuler release-management $pr done

3. 错误处理

bash

✅ 检查命令执行结果


./atomgit.sh approve-pr openeuler release-management 2547 /approve
if [ $? -eq 0 ]; then
echo ✅ 批准成功
else
echo ❌ 批准失败
fi


核心命令


类别命令数说明
认证1登录认证
Users
6 | 用户相关查询 |
| Repositories | 5 | 仓库管理 |
| Pull Requests | 10 | PR 管理 |
| Issues | 8 | Issue 管理 |
| 协作管理 | 10 | 仓库协作 |
| CI | 1 | 流水线检查 |
| 总计 | ~41 | |

认证命令

命令说明示例
login登录认证./scripts/atomgit.sh login TOKEN

Users 命令

命令说明示例
user-info获取当前用户信息./scripts/atomgit.sh user-info
user-profile
获取指定用户信息 | ./scripts/atomgit.sh user-profile username | | user-repos | 获取用户仓库 | ./scripts/atomgit.sh user-repos | | starred-repos | 获取 Star 的仓库 | ./scripts/atomgit.sh starred-repos | | watched-repos | 获取 Watch 的仓库 | ./scripts/atomgit.sh watched-re

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 atomgit-curl-1776023194 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 atomgit-curl-1776023194 技能

通过命令行安装

skillhub install atomgit-curl-1776023194

下载

⬇ 下载 AtomGit-Curl v3.0.4(免费)

文件大小: 20.15 KB | 发布时间: 2026-4-13 09:24

v3.0.4 最新 2026-4-13 09:24
v3.0.4 - High Confidence 修复:移除 set -e 避免管道冲突、使用局部变量存储 API 结果、添加 || true 防止 grep 失败

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部