Create a hackbot CLI tool that can interact with Hackbot

未关闭
#7,472 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
10/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

This spans three parts: token verification in hackbot-api, the client in libs/hackbot-client, and a new CLI. Start by reading how hackbot-api currently accepts allow-listed service accounts and how libs/hackbot-client authenticates, then settle the two open questions (action permissions and whether to create libs/hackbot-cli). Done means the design is agreed and the work is split into smaller issues, one per part.

由索引模型根据 Issue 内容生成。

描述

hackbot

Add a hackbot command-line tool, built on libs/hackbot-client, that lets Mozilla staff trigger and manage Hackbot runs from the terminal. Users sign in through their browser with their @mozilla.com Google account.

Scope

  • hackbot-api: accept individual Google ID tokens alongside the allow-listed service accounts:
    • Use a dedicated Desktop OAuth client ID as the token audience.
    • Require a verified email and hd == "mozilla.com".
    • Attribute user-initiated runs to the token's email (requested_by) and reject a mismatched X-On-Behalf-Of, so users can't create runs in someone else's name.
  • hackbot-client:
    • Add support for user credentials.
    • Add the missing methods: list_agents, list_runs, get_run, list_actions, get_artifact_url.
  • CLI:
    • login / logout / whoami: browser OAuth flow with a cached refresh token, plus a fallback for headless machines.
    • agents
    • run (with --wait)
    • runs (--mine, --agent, --status)
    • show / watch
    • actions / apply
    • artifact

Open questions

  • Should users be able to apply actions on any run (as they can in the UI today), or only on runs they requested?
  • Should the CLI live in its own package (libs/hackbot-cli) so the services that use hackbot-client don't pull in its dependencies?

With this, we could also create a plugin so that local CLI agents can trigger hackbot.

主要语言
Python
星标
579
派生
369
平均合并
3 天 5 小时
30 天内合并 PR
139

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mozilla/bugbug 的其他 Issue

查看 mozilla/bugbug 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。