proposal: new command tea times #50

Closed
opened 2019-10-25 09:24:52 +00:00 by noerw · 1 comment
Member

Add a new command: tea times (or tea time depending on #37 , no pun intended), which shows the tracked times.

This would make the time tracking feature usable in the first place for things like billing, as the web frontend doesn't provide a meaningful interface yet (tracked in https://github.com/go-gitea/gitea/issues/8684).

syntax

tea times [user] [--from=ISODate] [--to=ISODate]

semantics

We can make the command dead simple, or have smart semantics:

simple version

tea times [user] lists tracked times of the current repo. When a user is specified, only their times will be listed. When not in a repo (or no -r flag provided), it fails.

smart version

  • When in a repo, tea times [user] behaves as above
  • When not in a repo, tea times lists all tracked times of the logged-in user across repos (/api/v1/user/times). The [user] parameter is meaningless here.

discussion

  • I'm not sure if different semantics within the same syntax are a good idea, as the parameters differ. What is your impression?

  • What would be a good time filter format? ISO Dates are hard to type. Does golang provide a good human time parsing library (eg --from='1 month ago')?


I'd be willing to implement this, but have no ETA.

Add a new command: `tea times` (or `tea time` depending on #37 , no pun intended), which shows the tracked times. This would make the time tracking feature usable in the first place for things like billing, as the web frontend doesn't provide a meaningful interface yet (tracked in https://github.com/go-gitea/gitea/issues/8684). ### syntax ``` tea times [user] [--from=ISODate] [--to=ISODate] ``` ### semantics We can make the command dead simple, or have smart semantics: #### simple version `tea times [user]` lists tracked times of the current repo. When a user is specified, only their times will be listed. When not in a repo (or no `-r` flag provided), it fails. #### smart version - When in a repo, `tea times [user]` behaves as above - When not in a repo, `tea times` lists all tracked times of the logged-in user across repos (`/api/v1/user/times`). The `[user]` parameter is meaningless here. ### discussion - I'm not sure if different semantics within the same syntax are a good idea, as the parameters differ. What is your impression? - What would be a good time filter format? ISO Dates are hard to type. Does golang provide a good human time parsing library (eg `--from='1 month ago'`)? --- I'd be willing to implement this, but have no ETA.
6543 added the
kind
feature
label 2019-10-25 22:29:40 +00:00
lunny added this to the v0.2.0 milestone 2020-03-05 15:49:35 +00:00
Owner

#54 closed this

#54 closed this
6543 closed this issue 2020-03-06 11:31:57 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#50
No description provided.