Distributed, offline-first bug tracker embedded in git, with bridges

git-bug

Backers on Open Collective Sponsors on Open Collective License: GPL v3 GoDoc Go Report Card Gitter chat

git-bug is a bug tracker that:

  • is fully embedded 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.

🚧 This is now more than a proof of concept, but still not fully stable. Expect dragons and unfinished business. 🚧

Help needed!

This project has grown bigger than I can handle by myself, especially with a day job. I'm looking for people to help on or maintain part of it:

  • each bridges (go)
  • the terminal UI (go)
  • the web UI (Typescript/React/GraphQL)

Individually, those pieces are not especially complex but doing everything make it hard for me to focus on the core where things get more complicated. If this is useful for you or you just want to join the fun, maybe consider it?

Installation

Pre-compiled binaries
  1. Go to the release page and download the appropriate binary for your system.
  2. Copy the binary anywhere in your $PATH
  3. Rename the binary to git-bug (or git-bug.exe on windows)

That's all !

Linux packages
macOS packages
FreeBSD package/port

Install via the package manager

pkg install git-bug

Or from the ports collection

cd /usr/ports/devel/git-bug && make install clean
Compile from git (unstable)
git clone [email protected]:MichaelMure/git-bug.git
make install

If it's not done already, add the golang binary directory in your PATH:

export PATH=$PATH:$(go env GOROOT)/bin:$(go env GOPATH)/bin

Workflows

There are multiple ways to use git-bug:

Native workflow

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.

Bridge workflow

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 !

Web UI workflow (WIP)

Web UI workflow

Often, projects needs 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. Contribution are very much welcome!

CLI usage

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 [
   
    ]

   

And pull for updates:

git bug pull [
   
    ]

   

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 --help or read the command's documentation.

Interactive terminal UI

An interactive terminal UI is available using the command git bug termui to browse and edit bugs.

Termui recording

Web UI (status: WIP)

You can launch a rich Web UI with git bug webui.

Web UI screenshot 1

Web UI screenshot 2

This web UI is entirely packed inside the same go binary and serve static content through a localhost http server.

The web UI interact with the backend through a GraphQL API. The schema is available here.

Bridges

Importer implementations

Github Gitlab Jira Launchpad
incremental
(can import more than once)
✔️ ✔️ ✔️
with resume
(download only new data)
✔️ ✔️ ✔️
identities ✔️ ✔️ ✔️ ✔️
identities update
bug ✔️ ✔️ ✔️ ✔️
comments ✔️ ✔️ ✔️ ✔️
comment editions ✔️ ✔️
labels ✔️ ✔️ ✔️
status ✔️ ✔️ ✔️
title edition ✔️ ✔️ ✔️
media/files
automated test suite ✔️ ✔️

Exporter implementations

Github Gitlab Jira Launchpad
bug ✔️ ✔️ ✔️
comments ✔️ ✔️ ✔️
comment editions ✔️ ✔️ ✔️
labels ✔️ ✔️ ✔️
status ✔️ ✔️ ✔️
title edition ✔️ ✔️ ✔️
automated test suite ✔️ ✔️

Bridge usage

Interactively configure a new github bridge:

git bug bridge configure

Or manually:

git bug bridge configure \
    --name=<bridge> \
    --target=github \
    --url=https://github.com/MichaelMure/git-bug \
    --login=<login>
    --token=<token>

Import bugs:

git bug bridge pull [<name>]

Export modifications:

git bug bridge push [<name>]

Deleting a bridge:

git bug bridge rm [<name>]

Internals

Interested by how it works ? Have a look at the data model and the internal bird-view.

Misc

Planned features

  • media embedding
  • more bridges
  • extendable data model to support arbitrary bug tracker
  • inflatable raptor

Contribute

PRs accepted. Drop by the Gitter lobby for a chat or browse the issues to see what is worked on or discussed.

git clone [email protected]:MichaelMure/git-bug.git

You can now run make to build the project, or make install to install the binary in $GOPATH/bin/.

To work on the web UI, have a look at the dedicated Readme.

Contributors ❤️

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

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.

Comments
  • Deal with github bridge import rate limit

    Deal with github bridge import rate limit

    An attempt to solve #315. Changes:

    • New GraphQL queries: It is much more efficient with respect to the rate limit of the Github API.
    • If the Github rate limit is hit, then git-bug sleeps until the limit is reset.
    • Replaces the iterator based import interface with a Go-channel based interface
    • Fetching the data in a separate Go-routine: The import is faster.
  • WebUI: Add user profile

    WebUI: Add user profile

    Adds a profile page for identities. Clicking on the user name in the AppBar will display a menu. Author component will link to the profile page of the respective identity.

    Requires:

    • [x] email fix
    • [x] author dark mode color fix
    • [x] discuss, what should happen with the bug listing on profil page
  • feat: Github import

    feat: Github import

    In a similar fashion as git-bug, Github expose in its graphql API both compiled data of an issue and a timeline of events.

    {
      repository(owner: "MichaelMure", name: "git-bug") {
        issues(first: 10) {
          nodes {
            title
            createdAt
            bodyText
            labels(first: 10) {
              nodes {
                name
              }
            }
            timeline(first: 10) {
              nodes {
                __typename
                ... on IssueComment {
                  author {
                    login
                    avatarUrl
                  }
                  authorAssociation
                  bodyText
                  createdAt
                }
                ... on LabeledEvent {
                  createdAt
                  actor {
                    login
                  }
                  label {
                    color
                    name
                  }
                }
                ... on UnlabeledEvent {
                  createdAt
                  actor {
                    login
                  }
                  label {
                    color
                    name
                  }
                }
              }
            }
          }
        }
      }
    }
    

    We can use this timeline to import issue into git-bug. However, there is some mismatch that need to be resolved. Notably, in git-bug, a person is:

    type Person struct {
    	Name  string
    	Email string
    }
    

    Where for Github, an actor is:

    avatarUrl (URI!)
    A URL pointing to the actor's public avatar.
    
    login (String!)
    The username of the actor.
    
    resourcePath (URI!)
    The HTTP path for this actor.
    
    url (URI!)
    The HTTP URL for this actor.
    
  • WebUI - allow to create bugs

    WebUI - allow to create bugs

    If iI did not miss anything, the Web-UI is currently read-only. To be ablle to create bugs, comments, edit, remove and so on in a way that works for any kind of (non-technical) users, is very important for any project that might has such users.

    An alternative solution coudl be, to make an alreayd existing GUI/WebUI to use git-bug as a backend, like suggeste for example in https://github.com/MichaelMure/git-bug/issues/80.

    What are your thoughs about this, how hard would it be to implement it, what problems do you see?

  • git: Allow signing of commits

    git: Allow signing of commits

    We could add more ways of specifying a key, such as picking one from the adopted identity, but for now with this change we allow users who know what they are doing to sign their bug changes.

    By simply passing "-S" to git commit-tree when "commit.gpgsign" is "true", we use git's mechanism for key choosing which is either by the configured user name and email OR by whatever is specified in "user.signingkey".

  • Serialization format

    Serialization format

    Bug's data are stored using git Commit, Tree and Blob. Inside a Blob is serialized an OperationPack, that is an array of edit operation on the bug's state.

    This OperationPack is currently serialized using golang's gob, which is neat because it just works. However, it might not be the best option for interoperability with other tools in the future.

    How should that be serialized ? Json ? In any case, git will compress the data using zlib so a text format might not be that terrible.

    Feel free to argue a case here.

  • GitHub bridge doesnt' handle mutation API rate limit

    GitHub bridge doesnt' handle mutation API rate limit

    I have a GitHub project with many open issues: https://github.com/datalad/datalad

    Running bridge pull for the first time, obtains a large chunk of them until the limit is exhausted.

    % git bug bridge pull
    ...
    new issue: 1b7fd677f16d7dfea56f0caad895c5e944b57c31
    changed label: da246a71ce5a0ee9f4603b25385a9a2ab69af2921ebffe62b92740f9db66a0b6
    import error: API rate limit exceeded
    imported 1935 issues and 63 identities with default bridge
    git bug bridge pull  336.95s user 60.75s system 15% cpu 43:33.15 total
    

    I was expecting a resume (after a cool down period) would pick up a few more, but it doesn't:

    % git bug bridge pull
    import error: API rate limit exceeded
    imported 0 issues and 0 identities with default bridge
    git bug bridge pull  169.74s user 78.93s system 9% cpu 42:08.63 total
    

    Similar runtime suggests that the same issues were processed, hence none were obtained in addition, before the same rate limit kicked in.

    I can use --since to get a few more, but not all it seems. Is there a way to incrementally pull a large number of issues from github?

  • Fish completion not working

    Fish completion not working

    Fish completion for git-bug doesn't seem to work for me. Since it wasn't even listed in the readme I assumed there wasn't a completion script available and have started working on my own version, but then I found it in the repository.

    Is the script just a work in progress or should it work properly and this is an actual bug?

  • Complete bug IDs where appropriate

    Complete bug IDs where appropriate

    This completes bug IDs in bash and fish. I haven't gotten completions to work in zsh. In fish, the bug titles are shown as completion label, and can be searched for. I don't know if/how other shells can show the completion label. Maybe they don't use "\t" as separator but it seems to do no harm.

    The interface does not yet seem ideal because sometimes subcommands and bug IDs are both valid. Since there can be lots of bug IDs, they overshadow the subcommands. I wonder if instead of

    git bug status open 0123acd
    

    we should use

    git bug status --open 0123acd
    

    or if there's some other way to avoid ambiguity.

    If that doesn't work out, fish has a -k/--keep-order flag, so subcommand completions can be listed before bug IDs, but that's neither portable nor a pretty solution.

    Part of #493

  • jira: rework to use the credential system + adapt to refactors

    jira: rework to use the credential system + adapt to refactors

    @cheshirekow this PR adapt the Jira bridge to the credential system and to all the refactor I did recently. Please have a look

    Note: It compiles but I can't test myself (automated tests would be veeery useful). Note: the base of this PR is your branch pushed on this remote, otherwise I can't PR on it

    A few questions:

    • do you think it would be possible to detect automatically the credential (session or token) ? That would simplify both the code and the UX
    • there is a mismatch between the name and value of this constant, what's the good concept ? metaKeyJiraOperationId = "jira-derived-id"
    • it looks it would be very easy to support the official hosted Jira instances, it should simply be a default value in the baseURL prompt (see gitlab). What do you think ?
  • CLI UX need refinements

    CLI UX need refinements

    To be consistent with git core, I suggest the following commands and behaviours:

    • git bug lists bugs (replaces git bug ls)(similar behaviour to remote and branch)
    • git bug --help shows available commands (replaces git bug commands)
    • git bug add creates a new report (replaces git bug new as commands should be verbs)
  • build(deps): bump github.com/praetorian-inc/gokart from 0.4.0 to 0.5.1

    build(deps): bump github.com/praetorian-inc/gokart from 0.4.0 to 0.5.1

    Bumps github.com/praetorian-inc/gokart from 0.4.0 to 0.5.1.

    Release notes

    Sourced from github.com/praetorian-inc/gokart's releases.

    v0.5.1

    No release notes provided.

    v0.5.0

    No release notes provided.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/99designs/gqlgen from 0.17.17 to 0.17.20

    build(deps): bump github.com/99designs/gqlgen from 0.17.17 to 0.17.20

    Bumps github.com/99designs/gqlgen from 0.17.17 to 0.17.20.

    Release notes

    Sourced from github.com/99designs/gqlgen's releases.

    v0.17.20

    What's Changed

    New Contributors

    Full Changelog: https://github.com/99designs/gqlgen/compare/v0.17.19...v0.17.20

    v0.17.19

    What's Changed

    New Contributors

    Full Changelog: https://github.com/99designs/gqlgen/compare/v0.17.17...v0.17.19

    v0.17.18

    What's Changed

    New Contributors

    Full Changelog: https://github.com/99designs/gqlgen/compare/v0.17.17...v0.17.18

    Changelog

    Sourced from github.com/99designs/gqlgen's changelog.

    v0.17.20 - 2022-09-19

    • 0e4cbd10 release v0.17.20

    This picks up a new 2022 version of golang.org/x/sys which is caused by golang/go#49219 and is needed to fix building using Go 1.18 on aarch64-darwin.

    The diagram wasn't rendering properly in Go docs, which was a shame because it's a great diagram. This PR fixes that by indenting it another space.

    • d29d098f fix field merging behavior for fragments on interfaces (#2380)

    • 6bb31862 Update changelog for v0.17.19

    • bb7fbc0f v0.17.19 postrelease bump

    v0.17.19 - 2022-09-15

    • 588c6ac1 release v0.17.19

    • c6713170 v0.17.18 postrelease bump

    v0.17.18 - 2022-09-15

    • 1d41c808 release v0.17.18

    • 4dbe2e47 update graphiql to 2.0.7 (#2375)

    • Update tracing_test.go

    • add missing imports

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Display copyright, as-is notice and license declaration with `help` and `version` sub-commands

    Display copyright, as-is notice and license declaration with `help` and `version` sub-commands

    As recommended in the GPLv3 at https://github.com/MichaelMure/git-bug/blob/896d7cb1b03d449f399bd835693188c3910866a5/LICENSE#L655.

    Note that these should also be shown in termui and webui when the appropriate functions are executed.

  • Missing copyright headers from project files

    Missing copyright headers from project files

    Since this project is licensed under GPL3 (which refers to the developer's copyright), we should have a header in each file similar to the one at the top of each of the Go Standard Library's files (see https://github.com/golang/go/blob/54182ff54a687272dd7632c3a963e036ce03cb7c/src/fmt/print.go#L1-L3 for an example).

    This header should contain a copyright statement as well as a reference to the project's top-level LICENSE file. Sub-tasks are:

    • [ ] Add a workflow "check" to verify headers are present in all files.
    • [ ] Add the header to all files.
    • [ ] Add a COPYRIGHT file to the project root.
  • Is the GPL3 license too restrictive

    Is the GPL3 license too restrictive

    Since the entities and caching are being generalized to allow others to use git-bug as a library for storing data in git, is the GPL3 license too restrictive? Will needing to release derivative products under the same GPL3 license dissuade people from adopting git-bug as a library? Can we build a bigger eco-system with a less restrictive license?

ReGit: A Tiny Git-Compatible Git Implementation written in Golang

ReGit is a tiny Git implementation written in Golang. It uses the same underlying file formats as Git. Therefore, all the changes made by ReGit can be checked by Git.

Aug 30, 2022
A Git RPC service for handling all the git calls made by GitLab
A Git RPC service for handling all the git calls made by GitLab

Quick Links: Roadmap | Want to Contribute? | GitLab Gitaly Issues | GitLab Gitaly Merge Requests | Gitaly is a Git RPC service for handling all the gi

Nov 13, 2021
A simple cli tool for switching git user easily inspired by Git-User-Switch
A simple cli tool for switching git user easily inspired by Git-User-Switch

gitsu A simple cli tool for switching git user easily inspired by Git-User-Switch Installation Binary releases are here. Homebrew brew install matsuyo

Sep 15, 2022
Removes unnecessarily saved git objects to optimize the size of the .git directory.

Git Repo Cleaner Optimizes the size of the .git directory by removing all of the files that are unnecessarily-still-saved as part of the git history.

Mar 24, 2022
Gum - Git User Manager (GUM) - Switch between git user profiles
Gum - Git User Manager (GUM) - Switch between git user profiles

Git User Manager (GUM) Add your profile info to config.yaml Build project: go bu

Feb 14, 2022
Git-now-playing - Git commits are the new AIM status messages

git-now-playing git-now-playing is an attempt to bring some of the panache of th

Apr 4, 2022
Gogs is a painless self-hosted Git service
Gogs is a painless self-hosted Git service

Gogs - A painless self-hosted Git service 简体中文 ?? Vision The Gogs (/gɑgz/) project aims to build a simple, stable and extensible self-hosted Git servi

Sep 21, 2022
A highly extensible Git implementation in pure Go.
A highly extensible Git implementation in pure Go.

go-git is a highly extensible git implementation library written in pure Go. It can be used to manipulate git repositories at low level (plumbing) or

Sep 21, 2022
commit/branch/workdir explorer for git

gitin gitin is a commit/branch/status explorer for git gitin is a minimalist tool that lets you explore a git repository from the command line. You ca

Sep 22, 2022
A command-line tool that makes git easier to use with GitHub.

hub is a command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier. For an official

Sep 15, 2022
A tool to monitor git repositories and automatically pull & push changes

git-o-matic A tool to monitor git repositories and automatically pull & push changes Installation Packages & Binaries Arch Linux: gitomatic Binaries f

Sep 16, 2022
SQL interface to git repositories, written in Go. https://docs.sourced.tech/gitbase

gitbase gitbase, is a SQL database interface to Git repositories. This project is now part of source{d} Community Edition, which provides the simplest

Sep 16, 2022
Fast and powerful Git hooks manager for any type of projects.
Fast and powerful Git hooks manager for any type of projects.

Lefthook The fastest polyglot Git hooks manager out there Fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects. Fast. I

Sep 25, 2022
Implementation of git internals from scratch in Go language
Implementation of git internals from scratch in Go language

This project is part of a learning exercise to implement a subset of "git" commands. It can be used to create and maintain git objects, such as blobs, trees, commits, references and tags.

Aug 30, 2022
A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI
A Simple and Comprehensive Vulnerability Scanner for Container Images, Git Repositories and Filesystems. Suitable for CI

A Simple and Comprehensive Vulnerability Scanner for Containers and other Artifacts, Suitable for CI. Abstract Trivy (tri pronounced like trigger, vy

Sep 25, 2022
go mod vendor lets you check in your dependencies to git, but that's both bloaty (for developers) and tedious (remembering to update it).

go-mod-archiver Afraid of being unable to build historical versions of your Go program? go mod vendor lets you check in your dependencies to git, but

Aug 28, 2022
Quickly clone git repositories into a nested folders like GOPATH.

cl cl clones git repositories into nested folders like GOPATH and outputs the path of the cloned directory. Example: cl https://github.com/foo/bar Is

Jun 2, 2022
Switch between your git profiles easily
Switch between your git profiles easily

Git Profile Switcher Switch between your git profiles easily Install With Brew brew install theykk/tap/git-switcher With golang go get github.com/the

Sep 20, 2022
Store private data inside a git repository.

git-private lets you store private data inside a git repo. A common use case is protecting files containing API keys et.c.

Jul 25, 2022