mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-19 10:12:54 +02:00
bump code.gitea.io/sdk/gitea from untaged to 0.11.0 (#92)
bump code.gitea.io/sdk/gitea from untaged to 0.11.0 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/92 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
20
vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go
generated
vendored
20
vendor/code.gitea.io/sdk/gitea/issue_tracked_time.go
generated
vendored
@ -37,6 +37,12 @@ func (c *Client) GetRepoTrackedTimes(owner, repo string) ([]*TrackedTime, error)
|
||||
return times, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/times", owner, repo), nil, nil, ×)
|
||||
}
|
||||
|
||||
// ListTrackedTimes list tracked times of a single issue for a given repository
|
||||
func (c *Client) ListTrackedTimes(owner, repo string, index int64) ([]*TrackedTime, error) {
|
||||
times := make([]*TrackedTime, 0, 10)
|
||||
return times, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/times", owner, repo, index), nil, nil, ×)
|
||||
}
|
||||
|
||||
// GetMyTrackedTimes list tracked times of the current user
|
||||
func (c *Client) GetMyTrackedTimes() ([]*TrackedTime, error) {
|
||||
times := make([]*TrackedTime, 0, 10)
|
||||
@ -64,8 +70,14 @@ func (c *Client) AddTime(owner, repo string, index int64, opt AddTimeOption) (*T
|
||||
jsonHeader, bytes.NewReader(body), t)
|
||||
}
|
||||
|
||||
// ListTrackedTimes get tracked times of one issue via issue id
|
||||
func (c *Client) ListTrackedTimes(owner, repo string, index int64) ([]*TrackedTime, error) {
|
||||
times := make([]*TrackedTime, 0, 5)
|
||||
return times, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/%d/times", owner, repo, index), nil, nil, ×)
|
||||
// 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("DELETE", fmt.Sprintf("/repos/%s/%s/issues/%d/times", owner, repo, index), nil, nil)
|
||||
return err
|
||||
}
|
||||
|
||||
// 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("DELETE", fmt.Sprintf("/repos/%s/%s/issues/%d/times/%d", owner, repo, index, timeID), nil, nil)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user