Git-bug: Distributed, offline-first bug tracker embedded in Git
Git-bug: Distributed, offline-first bug tracker embedded in Git
Git-bug:嵌入 Git 的分布式、离线优先的缺陷追踪系统
git-bug is a bug tracker that: is fully integrated in git: you only need your git repository to have a bug tracker is distributed: use your normal git remote to collaborate, push and pull your bugs! works offline: in a plane or under the sea? Keep reading and writing bugs! prevents vendor lock-in: your usual service is down or went bad? You already have a full backup. is fast: listing bugs or opening them is a matter of milliseconds doesn’t pollute your project: no files are added in your project integrates with your tooling: use the UI you like (CLI, terminal, web) or integrate with your existing tools through the CLI or the GraphQL API bridges to other bug trackers: use bridges to import and export to other trackers.
git-bug 是一个缺陷追踪系统,其特点包括:完全集成于 Git 中,只需你的 Git 仓库即可拥有缺陷追踪功能;分布式,使用常规的 Git 远程仓库即可协作、推送和拉取缺陷;支持离线工作,无论是在飞机上还是深海中,都能继续阅读和编写缺陷;防止厂商锁定,当常用服务宕机或出现问题时,你已经拥有了完整的备份;速度快,列出或打开缺陷仅需几毫秒;不污染项目,不会在你的项目中添加任何文件;与现有工具集成,你可以使用喜欢的界面(CLI、终端、Web),或通过 CLI 和 GraphQL API 与现有工具集成;支持连接其他缺陷追踪系统,通过桥接功能导入和导出数据。
Installation
安装
See INSTALLATION.md for the complete guide, including how to build from source and verify your install.
请参阅 INSTALLATION.md 获取完整指南,包括如何从源码构建及验证安装。
Workflows
工作流
There are multiple ways to use git-bug. See the workflow documentation for the details.
使用 git-bug 有多种方式,详情请参阅工作流文档。
Native workflow
This is the pure git-bug experience. In a similar fashion as with code, use git bug push and git bug pull to push and pull your bugs between git remotes and collaborate with your teammate.
原生工作流
这是纯粹的 git-bug 体验。与处理代码的方式类似,使用 git bug push 和 git bug pull 在 Git 远程仓库之间推送和拉取缺陷,并与队友协作。
Bridge workflow
As git-bug has bridges with other bug-trackers, you can use it as your personal local remote interface. Sync with git bug bridge pull and git bug bridge push, work from your terminal, integrate into your editor, it’s up to you. And it works offline!
桥接工作流
由于 git-bug 拥有与其他缺陷追踪系统的桥接功能,你可以将其作为个人的本地远程接口。通过 git bug bridge pull 和 git bug bridge push 进行同步,在终端中工作,或集成到编辑器中,一切由你决定。而且它支持离线工作!
Web UI workflow (WIP) Often, projects need to have their bug-tracker public and accept editions from anyone facing a problem. To support this workflow, git-bug aims to have the web UI accept external OAuth authentication and act as a public portal. However the web UI is not up to speed for that yet. Contributions are very much welcome!
Web UI 工作流(开发中) 通常,项目需要公开其缺陷追踪系统,并接受任何遇到问题的人提交的内容。为了支持这一工作流,git-bug 旨在让 Web UI 支持外部 OAuth 认证,并作为公共门户。不过,目前的 Web UI 尚未完全实现此功能。非常欢迎贡献代码!
CLI usage
CLI 使用方法
Create a new identity: git bug user create
Create a new bug: git bug add
Your favorite editor will open to write a title and a message. You can push your new entry to a remote: git bug push [<remote>]
And pull for updates: git bug pull [<remote>]
List existing bugs: git bug ls
Filter and sort bugs using a query: git bug ls "status:open sort:edit"
Search for bugs by text content: git bug ls "foo bar" baz
You can now use commands like show, comment, open or close to display and modify bugs. For more details about each command, you can run git bug <command> --help or read the command’s documentation.
创建新身份:git bug user create
创建新缺陷:git bug add
你最喜欢的编辑器将会打开,用于编写标题和消息。你可以将新条目推送到远程仓库:git bug push [<remote>]
拉取更新:git bug pull [<remote>]
列出现有缺陷:git bug ls
使用查询语句过滤和排序缺陷:git bug ls "status:open sort:edit"
按文本内容搜索缺陷:git bug ls "foo bar" baz
现在你可以使用 show、comment、open 或 close 等命令来显示和修改缺陷。有关每个命令的更多详细信息,可以运行 git bug <command> --help 或阅读命令文档。
Interactive terminal UI
交互式终端 UI
An interactive terminal UI is available using the command git bug termui to browse and edit bugs.
使用 git bug termui 命令可以启动交互式终端 UI,用于浏览和编辑缺陷。
Web UI
Web UI
You can launch a rich Web UI with git bug webui. Browse, search and filter issues, open new ones, comment, and edit titles, labels and status. It also doubles as a code browser for your repository, with a file tree, syntax-highlighted files, commit history and diffs. The web UI is packed inside the same go binary and served by a local http server. It talks to the backend through a GraphQL API, whose schema is available here.
你可以使用 git bug webui 启动功能丰富的 Web UI。它支持浏览、搜索和过滤问题,创建新问题,评论,以及编辑标题、标签和状态。它还可以作为仓库的代码浏览器,提供文件树、语法高亮、提交历史和差异对比功能。Web UI 被打包在同一个 Go 二进制文件中,并由本地 HTTP 服务器提供服务。它通过 GraphQL API 与后端通信,其架构定义可在此处查看。
Bridges
桥接功能
git-bug can import from and export to Github, Gitlab, Jira and Launchpad. See the feature matrix for what each bridge supports, and the bridge documentation for the full guide.
git-bug 可以从 Github、Gitlab、Jira 和 Launchpad 导入数据并导出到这些平台。请参阅功能矩阵了解每个桥接支持的功能,并查看桥接文档获取完整指南。
Internals
内部原理
Interested in how it works? Have a look at the data model and the internal bird-view. The on-disk format is formally specified in the git-bug spec, covering the DAG entity format, identities and the bug entity. Read that if you want to write another implementation or a tool that reads git-bug data directly. Or maybe you want to make your own distributed data-structure in git? See also all the docs.
对它的工作原理感兴趣吗?请查看数据模型和内部概览。磁盘上的存储格式在 git-bug 规范中有正式定义,涵盖了 DAG 实体格式、身份和缺陷实体。如果你想编写另一种实现或直接读取 git-bug 数据的工具,请阅读该规范。或者,也许你想在 Git 中创建自己的分布式数据结构?请参阅所有文档。
Planned features
计划中的功能
The feature matrix gives a good overview of what is planned, without being exhaustive. Additional planned features: webUI that can be used as a public portal to accept user’s input, inflatable raptor.
功能矩阵很好地概述了计划中的功能,但并不详尽。其他计划中的功能包括:可用作公共门户以接受用户输入的 Web UI,以及充气猛禽(彩蛋)。
Contribute
贡献
PRs accepted. Drop by the Matrix room for a chat, look at the feature matrix or browse the issues and discussions to see what is worked on or discussed. See CONTRIBUTING.md to get a development environment going, build the project and run the tests. To work on the web UI, have a look at its dedicated README.
欢迎提交 PR。欢迎加入 Matrix 聊天室交流,查看功能矩阵,或浏览 Issue 和讨论区以了解当前的工作进展。请参阅 CONTRIBUTING.md 以搭建开发环境、构建项目并运行测试。如需参与 Web UI 的开发,请查看其专属的 README 文件。
License
许可证
Unless otherwise stated, this project is released under the GPLv3 or later license © Michael Muré. The git-bug logo by Viktor Teplov is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license © Viktor Teplov.
除非另有说明,本项目基于 GPLv3 或更高版本许可证发布 © Michael Muré。由 Viktor Teplov 设计的 git-bug 标志基于知识共享署名 4.0 国际 (CC BY 4.0) 许可证发布 © Viktor Teplov。