[Add] TrackedTimes delete functions #210

Merged
lunny merged 1 commits from 6543/go-sdk:add-tracked-times-functions into master 2020-01-07 03:42:19 +00:00
Owner
  • code format
  • add ResetIssueTime reset tracked time of a single issue for a given repository
  • add DeleteTime delete a specific tracked time by id of a single issue for a given repository

close #209

* code format * add **ResetIssueTime** reset tracked time of a single issue for a given repository * add **DeleteTime** delete a specific tracked time by id of a single issue for a given repository close #209
6543 added this to the v0.11.0 milestone 2020-01-06 03:11:28 +00:00
6543 added the
kind/feature
label 2020-01-06 03:11:28 +00:00
6543 added a new dependency 2020-01-06 05:23:00 +00:00
6543 added a new dependency 2020-01-06 05:23:16 +00:00
Member

Thanks! Please also add a route to list all user times across repos (/user/times), so we can add that as tea times user or something similar

Thanks! Please also add a route to list all user times across repos (`/user/times`), so we can add that as `tea times user` or something similar
Author
Owner

@noerw this is only provided via sudo-API wich the user has to be admin at the moment

@noerw this is only provided via sudo-API wich the user has to be admin at the moment
zeripath reviewed 2020-01-06 16:31:09 +00:00
Dismissed
@ -70,1 +73,3 @@
return times, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/times", owner, repo, index), nil, nil, &times)
// ResetIssueTime reset tracked time of a single issue for a given repository
func (c *Client) ResetIssueTime(owner, repo string, index int64) error {
_, err := c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/times", owner, repo, index), nil, nil)
Owner

I think this should be "DELETE" not "GET"

I think this should be "DELETE" not "GET"
zeripath reviewed 2020-01-06 16:31:32 +00:00
Dismissed
@ -71,0 +78,4 @@
// DeleteTime delete a specific tracked time by id of a single issue for a given repository
func (c *Client) DeleteTime(owner, repo string, index, timeID int64) error {
_, err := c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/times/%d", owner, repo, index, timeID), nil, nil)
Owner

Similarly "DELETE" not "GET"

Similarly "DELETE" not "GET"
Author
Owner

@zeripath done

@zeripath done
zeripath approved these changes 2020-01-06 18:15:24 +00:00
Dismissed
zeripath approved these changes 2020-01-06 18:15:29 +00:00
Dismissed
lunny approved these changes 2020-01-07 03:40:56 +00:00
Dismissed
lunny closed this pull request 2020-01-07 03:42:19 +00:00
6543 deleted branch add-tracked-times-functions 2020-01-07 04:19:13 +00:00
Sign in to join this conversation.
No description provided.