Skip to content

Commit fa7055a

Browse files
Merge pull request #43 from augmentable-dev/only-todos
Refocuses this tool on TODO comments
2 parents 8121b07 + d1db82e commit fa7055a

File tree

13 files changed

+46
-563
lines changed

13 files changed

+46
-563
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v1
1818

1919
- name: Build
20-
run: go build -v .
20+
run: go build -v cmd/main.go
2121

2222
- name: Test
2323
run: go test -v ./...

README.md

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
[![Go Report Card](https://goreportcard.com/badge/github.com/augmentable-dev/tickgit)](https://goreportcard.com/report/github.com/augmentable-dev/tickgit)
44
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/augmentable-dev/tickgit)
55
[![Coverage](http://gocover.io/_badge/github.com/augmentable-dev/tickgit)](http://gocover.io/github.com/augmentable-dev/tickgit)
6-
[![TODOs](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi.tickgit.com%2Fbadge%3Frepo%3Dgithub.com%2Faugmentable-dev%2Ftickgit)](https://www.tickgit.com/browse?repo=github.com/augmentable-dev/tickgit)
6+
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/augmentable-dev/tickgit)](https://www.tickgit.com/browse?repo=github.com/augmentable-dev/tickgit)
77

88
## tickgit 🎟️
99

10-
`tickgit` is a tool to help you manage tickets, todo items, and checklists within a codebase. Use the `tickgit` command to view pending tasks, progress reports, completion summaries and historical data (using `git` history).
10+
`tickgit` is a tool to help you manage latent work in a codebase. Use the `tickgit` command to view pending tasks, progress reports, completion summaries and historical data (using `git` history).
1111

1212
It's not meant to replace full-fledged project management tools such as JIRA or Trello. It will, hopefully, be a useful way to augment those tools with project management patterns that coexist with your code. As such, it's primary audience is software engineers.
1313

1414
### TODOs
1515

16-
`tickgit todos` will scan a codebase and identify any TODO items in the comments. It will output a report like so:
16+
`tickgit` will scan a codebase and identify any TODO items in the comments. It will output a report like so:
1717

1818
```
19-
# tickgit todos ~/Desktop/facebook/react
19+
# tickgit ~/Desktop/facebook/react
2020
...
2121
TODO:
2222
=> packages/scheduler/src/__tests__/SchedulerBrowser-test.js:85:9
@@ -37,69 +37,16 @@ TODO: useTransition hook instead.
3737
128 TODOs Found 📝
3838
```
3939

40-
Check out [an example](https://todos.tickg.it/?repo=https://github.com/kubernetes/kubernetes) of the TODOs tickgit will surface for the Kubernetes codebase.
40+
Check out [an example](https://www.tickgit.com/browse?repo=github.com/kubernetes/kubernetes) of the TODOs tickgit will surface for the Kubernetes codebase.
4141

4242
#### Coming Soon
4343

44-
- [x] History - get a better sense of how old TODOs are, when they were introduced and by whom
44+
- [x] Blame - get a better sense of how old TODOs are, when they were introduced and by whom
4545
- [ ] Context - more visibility into the lines of code _around_ a TODO for greater context
46-
47-
### Tickets
48-
49-
Tickets are a way of defining more complex tasks in your codebase as config files. Currently, tickets are HCL files that look like the following:
50-
51-
```hcl
52-
# rocketship.tickgit
53-
54-
goal "Build the Rocketship 🚀" {
55-
description = "Finalize the construction of the Moonblaster 2000"
56-
57-
task "Construct the engines" {
58-
status = "done"
59-
}
60-
61-
task "Attach the engines" {
62-
status = "pending"
63-
}
64-
65-
task "Thoroughly test the engines" {
66-
status = "pending"
67-
}
68-
}
69-
```
70-
71-
```
72-
$ tickgit status
73-
=== Build the Rocketship 🚀 ⏳
74-
--- 1/3 tasks completed (2 remaining)
75-
--- 33% completed
76-
77-
✅ Construct the engines
78-
⏳ Attach the engines
79-
⏳ Thoroughly test the engines
80-
```
81-
82-
#### Coming Soon
83-
84-
- [ ] Simpler ticket definitions - in YAML and/or other (less verbose) config languages
85-
- [ ] More complex tickets - more states, dependencies on other tickets, etc
86-
87-
### Checklists
88-
89-
_Coming soon_. Checklists will be a way of parsing Markdown checklists in your codebase (either in `.md` files, or within your comments).
90-
91-
92-
### Why is this useful?
93-
94-
This project is a proof-of-concept. Keeping tickets next to the code they're meant to describe could have the following benefits:
95-
96-
- Tickets live with the code, no need for a 3rd party tool or system (anyone with git access to the repository has access to contributing to the tickets)
97-
- Updating a ticket's status and merging/committing code are the same action, no need to synchronize across multiple tools
98-
- Source of truth for a project's ticket history is now the git history, which can be queried and analyzed
99-
- Current status of a `goal` can be reported by simply parsing the repository's `head`
100-
- Less context switching between the codebase itself and the system describing "what needs to be done"
101-
102-
Generally speaking, this is an experiment in ways to do project management, within the codebase of a project. With a `git` history and some clever parsing, quite a bit of metadata about a project can be gleaned from its codebase. Let's see how useful we can make that information.
46+
- [ ] More `TODO` type phrases to match, such as `FIXME`, `XXX`, `HACK`, or customized alternatives.
47+
- [ ] More configurability (e.g. custom ignore paths)
48+
- [ ] Markdown parsing
49+
- [ ] More thorough historical stats
10350

10451
### Installation
10552

@@ -110,10 +57,9 @@ brew tap augmentable-dev/tickgit
11057
brew install tickgit
11158
```
11259

113-
11460
### Usage
11561

116-
The most up to date usage will be the output of `tickgit --help`. The most common usage, however, is `tickgit status` which will print a status report of tickets for a given git repository. By default, it uses the current working directory.
62+
The most up to date usage will be the output of `tickgit --help`.
11763

11864
### API
11965

cmd/commands/root.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ import (
55
"os"
66

77
"github.com/briandowns/spinner"
8-
"github.com/spf13/cobra"
98
)
109

11-
var rootCmd = &cobra.Command{
12-
Use: "tickgit",
13-
Short: "Tickets as config",
14-
Long: `tickgit is a tool for helping you manage tickets and todos in your codebase, as a part of your git history`,
15-
}
16-
1710
// TODO clean this up
1811
func handleError(err error, spinner *spinner.Spinner) {
1912
if err != nil {
@@ -30,7 +23,7 @@ func handleError(err error, spinner *spinner.Spinner) {
3023

3124
// Execute adds all child commands to the root command and sets flags appropriately.
3225
func Execute() {
33-
if err := rootCmd.Execute(); err != nil {
26+
if err := todosCmd.Execute(); err != nil {
3427
fmt.Println(err)
3528
os.Exit(1)
3629
}

cmd/commands/status.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

cmd/commands/todos.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ var csvOutput bool
2020

2121
func init() {
2222
todosCmd.Flags().BoolVar(&csvOutput, "csv-output", false, "specify whether or not output should be in CSV format")
23-
24-
rootCmd.AddCommand(todosCmd)
2523
}
2624

2725
var todosCmd = &cobra.Command{

docs/API.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
## API
22

3-
If you'd like to access tickgit information about public `git` repositories, you can use our API.
4-
5-
### TODOs
3+
### TODOs Badge
64

7-
`GET` requests to `https://tickgit.augmentable.dev/todos` with the `repo` query param populated with the URL of a git repo, like so:
5+
`GET` requests to `https://api.tickgit.com/badgen` with a `repo` path segment:
86

97
```
10-
https://tickgit.augmentable.dev/todos?repo=https://github.com/facebook/react
8+
https://api.tickgit.com/badgen/github.com/facebook/react
119
```
12-
Will return a simple JSON response:
10+
11+
Supplying a `branch` segment will lookup a specific branch. `master` is the branch used if none is specified.
1312

1413
```
15-
{"todos":125}
14+
https://api.tickgit.com/badgen/github.com/facebook/react/branch-name
1615
```
1716

18-
Indicating the total count of TODOs found in the `HEAD` of that repository.
19-
20-
To indicate a branch, send a `branch` query param supplying the branch name.
21-
22-
_more coming soon!_
23-
24-
### TODOs Badge
25-
26-
Similarly, `GET` requests to `https://tickgit.augmentable.dev/todos-badge` with the same `repo` query param:
17+
Will return JSON that can be fed into a badgen badge: [https://badgen.net/https](https://badgen.net/https)
2718

2819
```
29-
http://tickgit.augmentable.dev/todos-badge?repo=https://github.com/facebook/react
20+
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/augmentable-dev/tickgit)](https://www.tickgit.com/browse?repo=github.com/augmentable-dev/tickgit)
3021
```
3122

32-
The `branch` query param will also work as above.
33-
34-
Will return JSON that can be fed into a shields.io badge: [https://shields.io/endpoint](https://shields.io/endpoint)
23+
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/augmentable-dev/tickgit)](https://www.tickgit.com/browse?repo=github.com/augmentable-dev/tickgit)

go.mod

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,18 @@ module github.com/augmentable-dev/tickgit
33
go 1.13
44

55
require (
6-
github.com/agext/levenshtein v1.2.2 // indirect
76
github.com/augmentable-dev/lege v0.0.0-20191028004410-79cb985065a1
8-
github.com/briandowns/spinner v1.8.0
7+
github.com/briandowns/spinner v1.9.0
98
github.com/dustin/go-humanize v1.0.0
10-
github.com/hashicorp/hcl/v2 v2.2.0
11-
github.com/karrick/godirwalk v1.13.4
12-
github.com/mattn/go-colorable v0.1.4 // indirect
13-
github.com/mattn/go-isatty v0.0.11 // indirect
14-
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
9+
github.com/fatih/color v1.9.0 // indirect
10+
github.com/karrick/godirwalk v1.15.3
11+
github.com/mattn/go-isatty v0.0.12 // indirect
1512
github.com/sergi/go-diff v1.1.0 // indirect
1613
github.com/spf13/cobra v0.0.5
1714
github.com/spf13/pflag v1.0.5 // indirect
1815
github.com/src-d/enry/v2 v2.1.0
19-
github.com/zclconf/go-cty v1.2.0 // indirect
20-
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876 // indirect
21-
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
22-
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 // indirect
23-
gopkg.in/src-d/go-billy.v4 v4.3.2
16+
golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6 // indirect
17+
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect
18+
golang.org/x/sys v0.0.0-20200217220822-9197077df867 // indirect
2419
gopkg.in/src-d/go-git.v4 v4.13.1
2520
)

0 commit comments

Comments
 (0)