diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Readme.md | 70 | ||||
-rw-r--r-- | doc/gen_bash_completion.go | 23 | ||||
-rw-r--r-- | doc/gen_manpage.go | 9 | ||||
-rw-r--r-- | doc/termui.png | bin | 0 -> 115807 bytes | |||
-rw-r--r-- | doc/webui.png | bin | 0 -> 173159 bytes | |||
-rw-r--r-- | git-bug.go | 4 | ||||
-rw-r--r-- | misc/bash_completion/git-bug (renamed from doc/bash_completion/git-bug) | 0 | ||||
-rw-r--r-- | misc/gen_bash_completion.go | 39 | ||||
-rw-r--r-- | misc/gen_zsh_completion.go (renamed from doc/gen_zsh_completion.go) | 2 | ||||
-rw-r--r-- | misc/zsh_completion/git-bug (renamed from doc/zsh_completion/git-bug) | 0 |
11 files changed, 83 insertions, 68 deletions
@@ -1,6 +1,6 @@ git-bug -!/doc/bash_completion/git-bug -!/doc/zsh_completion/git-bug +!/misc/bash_completion/git-bug +!/misc/zsh_completion/git-bug .gitkeep dist coverage.txt @@ -1,5 +1,9 @@ # git-bug +[![Build Status](https://travis-ci.org/MichaelMure/git-bug.svg?branch=master)](https://travis-ci.org/MichaelMure/git-bug) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3+-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) +[![GoDoc](https://godoc.org/github.com/MichaelMure/git-bug?status.svg)](https://godoc.org/github.com/MichaelMure/git-bug) + > Bugtracker embedded in Git Would it be nice to not have to rely on a web service somewhere to deal with bugs ? @@ -24,15 +28,15 @@ export PATH=$PATH:$GOROOT/bin:$GOPATH/bin That's all ! In the future, pre-compiled binary will be provided for convenience. -## Usage +## CLI usage -It's really a WIP but you can already create a bug: +Create a new bug: ``` -git bug new "This doesn't even build" +git bug new ``` -Your favorite editor will open to write a description. +Your favorite editor will open to write a title and a message. You can push your new entry to a remote: ``` @@ -44,56 +48,50 @@ And pull for updates: git bug pull [<remote>] ``` -You can now use commands like `show`, `comment`, `open` or `close` to display and modify bugs. - -## All commands +List existing bugs: +``` +git bug ls +``` -```bash -# Mark the bug as closed -git bug close <id> +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](doc/md/git-bug.md). -# Display available commands -git bug commands [<option>...] +## Interactive terminal UI -# Add a new comment to a bug -git bug comment [<options>...] <id> +An interactive (WIP) terminal UI is available using the command `git bug termui` to browse and edit bugs. -# Manipulate bug's label -git bug label <id> [<option>...] [<label>...] +![terminal UI](doc/termui.png) -# Display a summary of all bugs -git bug ls +// TODO: replace with less test data ;-) -# Create a new bug -git bug new [<option>...] <title> +## Web UI -# Mark the bug as open -git bug open <id> +You can launch a rich Web UI (terribly WIP) with `git bug webui`. -# Pull bugs update from a git remote -git bug pull [<remote>] +![Web UI](doc/webui.png) -# Push bugs update to a git remote -git bug push [<remote>] +This web UI is entirely packed inside the same go binary and serve static content through a localhost http server. -# Display the details of a bug -git bug show <id> +The web UI interact with the backend through a GraphQL API. The schema is available [here](graphql/schema.graphql). -# Launch the web UI -git bug webui -``` +Note: the compiled web UI is not commited in git for now so you will have to install npm packages and build it before compiling the go binary. ## Internals Interested by how it works ? Have a look at the [data model](doc/model.md). +## Misc + +- [Bash completion](misc/bash_completion) +- [Zsh completion](misc/zsh_completion) +- [ManPages](doc/man) + ## Planned features -- interactive CLI UI -- rich web UI -- media embedding -- import/export of github issue -- inflatable raptor +- [ ] interactive CLI UI +- [ ] rich web UI +- [ ] media embedding +- [ ] import/export of github issue +- [ ] inflatable raptor ## Contribute diff --git a/doc/gen_bash_completion.go b/doc/gen_bash_completion.go deleted file mode 100644 index 26473d2d..00000000 --- a/doc/gen_bash_completion.go +++ /dev/null @@ -1,23 +0,0 @@ -// +build ignore - -package main - -import ( - "fmt" - "github.com/MichaelMure/git-bug/commands" - "log" - "os" - "path" -) - -func main() { - cwd, _ := os.Getwd() - filepath := path.Join(cwd, "doc", "bash_completion", "git-bug") - - fmt.Println("Generating bash completion file ...") - - err := commands.RootCmd.GenBashCompletionFile(filepath) - if err != nil { - log.Fatal(err) - } -} diff --git a/doc/gen_manpage.go b/doc/gen_manpage.go index e5a38b3a..9fd2ea26 100644 --- a/doc/gen_manpage.go +++ b/doc/gen_manpage.go @@ -4,11 +4,12 @@ package main import ( "fmt" - "github.com/MichaelMure/git-bug/commands" - "github.com/spf13/cobra/doc" "log" "os" "path" + + "github.com/MichaelMure/git-bug/commands" + "github.com/spf13/cobra/doc" ) func main() { @@ -16,8 +17,8 @@ func main() { filepath := path.Join(cwd, "doc", "man") header := &doc.GenManHeader{ - Title: "MINE", - Section: "3", + Title: "GIT-BUG", + Section: "1", } fmt.Println("Generating manpage ...") diff --git a/doc/termui.png b/doc/termui.png Binary files differnew file mode 100644 index 00000000..ddf5e024 --- /dev/null +++ b/doc/termui.png diff --git a/doc/webui.png b/doc/webui.png Binary files differnew file mode 100644 index 00000000..2959b38a --- /dev/null +++ b/doc/webui.png @@ -1,8 +1,8 @@ //go:generate go run webui/pack_webui.go //go:generate go run doc/gen_markdown.go //go:generate go run doc/gen_manpage.go -//go:generate go run doc/gen_bash_completion.go -//go:generate go run doc/gen_zsh_completion.go +//go:generate go run misc/gen_bash_completion.go +//go:generate go run misc/gen_zsh_completion.go package main diff --git a/doc/bash_completion/git-bug b/misc/bash_completion/git-bug index d8505868..d8505868 100644 --- a/doc/bash_completion/git-bug +++ b/misc/bash_completion/git-bug diff --git a/misc/gen_bash_completion.go b/misc/gen_bash_completion.go new file mode 100644 index 00000000..3a75b0f5 --- /dev/null +++ b/misc/gen_bash_completion.go @@ -0,0 +1,39 @@ +// +build ignore + +package main + +import ( + "fmt" + "github.com/MichaelMure/git-bug/commands" + "log" + "os" + "path" +) + +func main() { + cwd, _ := os.Getwd() + filepath := path.Join(cwd, "misc", "bash_completion", "git-bug") + + fmt.Println("Generating bash completion file ...") + + //git := &cobra.Command{ + // Use: "git", + // BashCompletionFunction: "qsdhjlkqsdhlsd", + //} + // + //bug := &cobra.Command{ + // Use: "bug", + // BashCompletionFunction: "ZHZLDHKLZDHJKL", + //} + //git.AddCommand(bug) + + //for _, sub := range commands.RootCmd.Commands() { + // bug.AddCommand(sub) + //} + + //err := git.GenBashCompletionFile(filepath) + err := commands.RootCmd.GenBashCompletionFile(filepath) + if err != nil { + log.Fatal(err) + } +} diff --git a/doc/gen_zsh_completion.go b/misc/gen_zsh_completion.go index 74c900fb..41e08f9a 100644 --- a/doc/gen_zsh_completion.go +++ b/misc/gen_zsh_completion.go @@ -12,7 +12,7 @@ import ( func main() { cwd, _ := os.Getwd() - filepath := path.Join(cwd, "doc", "zsh_completion", "git-bug") + filepath := path.Join(cwd, "misc", "zsh_completion", "git-bug") fmt.Println("Generating zsh completion file ...") diff --git a/doc/zsh_completion/git-bug b/misc/zsh_completion/git-bug index dcd83163..dcd83163 100644 --- a/doc/zsh_completion/git-bug +++ b/misc/zsh_completion/git-bug |