Skip to content

Commit

Permalink
Add category/area label
Browse files Browse the repository at this point in the history
  • Loading branch information
ribtoks committed May 17, 2020
1 parent 5b574be commit 629aeca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
hourMinutes = 60
labelBranchPrefix = "branch: "
labelTypePrefix = "type: "
labelAreaPrefix = "area: "
)

func sourceRoot(root string) string {
Expand Down Expand Up @@ -211,6 +212,10 @@ func (s *service) labels(c *tdglib.ToDoComment) []string {
labels = append(labels, labelBranchPrefix+s.env.branch)
labels = append(labels, labelTypePrefix+strings.ToLower(c.Type))

if len(c.Category) > 0 {
labels = append(labels, labelAreaPrefix+c.Category)
}

if c.Estimate > minEstimate {
minutes := math.Round(c.Estimate * hourMinutes)
estimate := ""
Expand Down

0 comments on commit 629aeca

Please sign in to comment.