File tree Expand file tree Collapse file tree 5 files changed +14
-10
lines changed Expand file tree Collapse file tree 5 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) , and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
7
## [ Unreleased]
8
+ ### Changed
9
+ - Replace [ manifoldco/promptui] ( https://github.com/charmbracelet/huh ) with [ charmbracelet/huh] ( https://github.com/charmbracelet/huh ) due to lack of maintainer
10
+ - code cleanup pass, simplified structs, improved messaging, aligned variable naming
8
11
9
12
## [ 0.5.4] - 2024-03-29
10
13
### Fixed
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ require (
18
18
github.com/catppuccin/go v0.2.0 // indirect
19
19
github.com/charmbracelet/bubbles v0.18.0 // indirect
20
20
github.com/charmbracelet/bubbletea v0.25.0 // indirect
21
- github.com/charmbracelet/lipgloss v0.9.1 // indirect
22
- github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
21
+ github.com/charmbracelet/lipgloss v0.10.0 // indirect
22
+ github.com/containerd/console v1.0.4 // indirect
23
23
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
24
24
github.com/gdamore/encoding v1.0.1 // indirect
25
25
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
Original file line number Diff line number Diff line change @@ -14,8 +14,12 @@ github.com/charmbracelet/huh/spinner v0.0.0-20240328185852-590ecabc34b9 h1:gC8Qv
14
14
github.com/charmbracelet/huh/spinner v0.0.0-20240328185852-590ecabc34b9 /go.mod h1:nrBG0YEHaxdbqHXW1xvG1hPqkuac9Eg7RTMvogiXuz0 =
15
15
github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg =
16
16
github.com/charmbracelet/lipgloss v0.9.1 /go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I =
17
+ github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s =
18
+ github.com/charmbracelet/lipgloss v0.10.0 /go.mod h1:Wig9DSfvANsxqkRsqj6x87irdy123SR4dOXlKa91ciE =
17
19
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY =
18
20
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 /go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk =
21
+ github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro =
22
+ github.com/containerd/console v1.0.4 /go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk =
19
23
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4 =
20
24
github.com/cpuguy83/go-md2man/v2 v2.0.4 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
21
25
github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ var IssuesCommand = &cli.Command{
96
96
if err != nil {
97
97
return err
98
98
}
99
- timeSpent , err := InputTimeSpentForm ()
99
+ timeSpent , err := InputTimeSpentForm (issue )
100
100
if err != nil {
101
101
return err
102
102
}
@@ -131,10 +131,8 @@ var LogWorkCommand = &cli.Command{
131
131
if err != nil {
132
132
return err
133
133
}
134
- fmt .Printf ("%s %s\n " , issue .Key , issue .Fields .Summary )
135
- fmt .Printf ("Status: %s\n " , issue .Fields .Status .Name )
136
134
if timeSpent == "" {
137
- timeSpent , err = InputTimeSpentForm ()
135
+ timeSpent , err = InputTimeSpentForm (issue )
138
136
if err != nil {
139
137
return err
140
138
}
@@ -183,9 +181,7 @@ var GitOrIssueListAction = func(c *cli.Context) error {
183
181
if err != nil {
184
182
return err
185
183
}
186
- fmt .Printf ("Status: %s\n Summary: %s\n " , issue .Fields .Status .Name , issue .Fields .Summary )
187
- // log time or view issue
188
- timeSpent , err := InputTimeSpentForm ()
184
+ timeSpent , err := InputTimeSpentForm (issue )
189
185
if err != nil {
190
186
return nil
191
187
}
Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ func SelectIssueForm(issues []Issue) (Issue, error) {
55
55
return chosenIssue , nil
56
56
}
57
57
58
- func InputTimeSpentForm () (string , error ) {
58
+ func InputTimeSpentForm (issue Issue ) (string , error ) {
59
59
timeSpent := ""
60
60
61
61
form := huh .NewForm (
62
62
huh .NewGroup (
63
63
huh .NewInput ().
64
64
Title ("Log time" ).
65
+ Description (fmt .Sprintf ("%s %s" , issue .Key , issue .Fields .Summary )).
65
66
Placeholder ("1h / 1h30m / 30m" ).
66
67
Value (& timeSpent ).
67
68
Validate (func (input string ) error {
You can’t perform that action at this time.
0 commit comments