← 返回
沟通协作 Key 中文

GitHub Chat Assistant (Whatsapp)

Manage a single GitHub repository via chat for non-technical requesters—after they share the repo URL and a temporary personal token, pull status, summarize who did what and when, and create/follow up on issues directly through the GitHub API.
通过聊天管理单个 GitHub 仓库,供非技术人员使用:在获取仓库 URL 和临时个人令牌后,支持拉取状态、汇总操作记录以及直接通过 API 创建或跟进 Issue。
iamkalio
沟通协作 clawhub v1.0.0 1 版本 99773.6 Key: 需要
★ 0
Stars
📥 1,322
下载
💾 50
安装
1
版本
#latest

概述

Overview

Use this skill whenever a non-technical person (often over WhatsApp) needs lightweight GitHub help without cloning or forking a repo. Typical asks:

  • "Tell me what changed recently and who did it."
  • "Create an issue describing X."
  • "Follow up on existing issues or PRs."

The workflow relies entirely on the GitHub REST API using a personal access token (PAT) the requester provides during the chat.

1. Gather prerequisites every session

  1. Repo identifier – ask for full URL or owner/name.
  2. PAT – confirm it has repo scope (private repos) or public_repo (public). Remind them to generate a short-lived token and send it in the chat; you’ll discard it afterward.
  3. Task brief – what they need (issue, summary, follow-up) plus timeframe (e.g., "last 7 days").

_Always restate the inputs back to them before acting. If anything is missing, pause and ask._

2. Handle tokens safely

  • Paste the token into a temporary shell variable in the current session only:

```bash

export GITHUB_TOKEN=""

```

  • Never save tokens to disk or log files. When finished, run unset GITHUB_TOKEN.
  • Every API call must set Authorization: Bearer $GITHUB_TOKEN and Accept: application/vnd.github+json.

3. Fetch repo context before acting

  1. Health check: GET /repos/{owner}/{repo} – confirms access and surfaces default branch.
  2. Recent commits (for summaries / who-did-what):
    • GET /repos/{owner}/{repo}/commits?since=&until=
    • For per-author breakdown, add author= or group results locally.
  3. Issues & PRs: GET /repos/{owner}/{repo}/issues?state=all&since=.
    • Distinguish PRs via pull_request key.

Record the raw JSON responses (e.g., save to /tmp/commits.json) if you need to run jq filters before summarizing.

4. Deep repo inspection without cloning

When you need file-level context (to quote code in an issue or explain why a commit matters), walk the tree via the REST API:

  1. List directories/files: GET /repos/{owner}/{repo}/contents/?ref= returns metadata plus download URLs.
  2. Fetch raw blobs: reuse the download_url or call GET /repos/{owner}/{repo}/contents/ with header Accept: application/vnd.github.raw.
  3. Large trees: GET /repos/{owner}/{repo}/git/trees/?recursive=1 to grab the whole structure, then request the files you care about.
  4. Cache what you read per session (e.g., store under /tmp/github-chat-ops//...) so subsequent lookups avoid extra API calls.

Always mention the file + path + relevant snippet when writing summaries or issues.

5. Summaries for non-technical readers (with real changes)

Translate activity into plain language:

  • Group commits by contributor, then describe what actually changed (features/tests/configs) rather than just commit titles.
  • For each commit, hit GET /repos/{owner}/{repo}/commits/{sha} to see files[] (filenames, additions/removals, patch).
  • Extract the top 1–2 bullets per contributor: e.g., "Updated quiz_generator.py to support context prompts and added 3 YAML fixtures."
  • Mention timestamps in the user’s timezone (Africa/Lagos unless told otherwise).
  • Highlight status (merged, open, blocked) and outstanding follow-ups.

Keep summaries short, bullet-style, and avoid jargon.

6. Creating or updating issues

  1. Clarify the problem, expected outcome, priority, and owners while chatting.
  2. Draft the issue body locally in Markdown (include background, repro steps, acceptance criteria).
  3. Create the issue via POST /repos/{owner}/{repo}/issues with JSON payload:

```json

{

"title": "...",

"body": "...",

"assignees": ["username"],

"labels": ["priority:high"]

}

```

  1. Echo the created issue URL back to the user and summarize what was filed.

_For follow-ups_, use PATCH /repos/{owner}/{repo}/issues/{number} to update state or assignees, and POST /repos/{owner}/{repo}/issues/{number}/comments for status notes.

7. Conversation pattern (WhatsApp-ready)

  1. Confirm: "I’ll need the repo URL + a temporary token with repo scope—can you share those now?"
  2. After each action, report in natural language first, then share links/details.
  3. Keep tokens out of summaries. If the user sends screenshots or sensitive info, acknowledge and avoid re-sharing it elsewhere.

8. Daily automation & cron jobs

  • Store long-lived secrets outside the skill (e.g., .env.github-chat-ops with GITHUB_CHAT_OPS_TOKEN, repo, timezone).
  • Build reusable scripts under scripts/ (see scripts/github_chat_ops_daily.py) that load env vars, call the same APIs, and print a ready-to-send summary.
  • When scheduling via cron, run the script from the workspace root, capture stdout verbatim for the message, and surface errors if the script exits non-zero.
  • Let end users customize repo/timezone by editing the env file; document that in the skill release notes so downstream consumers know where to look.

9. References

Use references/github-api-cheatsheet.md for ready-made curl templates covering the endpoints above plus pagination tips.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 02:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,725
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,404
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,678