summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/issue.go')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/issue.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/issue.go b/vendor/code.gitea.io/sdk/gitea/issue.go
index 8fc2b2bf7b..0a1defb6f3 100644
--- a/vendor/code.gitea.io/sdk/gitea/issue.go
+++ b/vendor/code.gitea.io/sdk/gitea/issue.go
@@ -139,6 +139,22 @@ func (c *Client) EditIssue(owner, repo string, index int64, opt EditIssueOption)
jsonHeader, bytes.NewReader(body), issue)
}
+// StartIssueStopWatch starts a stopwatch for an existing issue for a given
+// repository
+func (c *Client) StartIssueStopWatch(owner, repo string, index int64) error {
+ _, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/issues/%d/stopwatch/start", owner, repo, index),
+ jsonHeader, nil)
+ return err
+}
+
+// StopIssueStopWatch stops an existing stopwatch for an issue in a given
+// repository
+func (c *Client) StopIssueStopWatch(owner, repo string, index int64) error {
+ _, err := c.getResponse("POST", fmt.Sprintf("/repos/%s/%s/issues/%d/stopwatch/stop", owner, repo, index),
+ jsonHeader, nil)
+ return err
+}
+
// EditDeadlineOption options for creating a deadline
type EditDeadlineOption struct {
// required:true