diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-30 20:02:53 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-30 20:02:53 +0200 |
commit | f8e6b13a2ed8d022ef206de809546dcc0318cd08 (patch) | |
tree | 0ddcf959b647c2c0e6268fcfd66cb3b5a9e2900b | |
parent | eae18052c0abbee5b38fca793ec2f804ec2e6c61 (diff) | |
download | gitlab-f8e6b13a2ed8d022ef206de809546dcc0318cd08.tar.gz |
Update time stats docs
-rw-r--r-- | docs/gl_objects/issues.rst | 6 | ||||
-rw-r--r-- | docs/gl_objects/mrs.rst | 30 |
2 files changed, 36 insertions, 0 deletions
diff --git a/docs/gl_objects/issues.rst b/docs/gl_objects/issues.rst index 027d5bc..0a6b254 100644 --- a/docs/gl_objects/issues.rst +++ b/docs/gl_objects/issues.rst @@ -126,6 +126,12 @@ Get time tracking stats:: issue.time_stats() +On recent versions of Gitlab the time stats are also returned as an issue +object attribute:: + + issue = project.issue.get(iid) + print(issue.attributes['time_stats']) + Set a time estimate for an issue:: issue.time_estimate('3h30m') diff --git a/docs/gl_objects/mrs.rst b/docs/gl_objects/mrs.rst index 731785d..ca9b864 100644 --- a/docs/gl_objects/mrs.rst +++ b/docs/gl_objects/mrs.rst @@ -94,3 +94,33 @@ List the diffs for a merge request:: Get a diff for a merge request:: diff = mr.diffs.get(diff_id) + +Get time tracking stats:: + + merge request.time_stats() + +On recent versions of Gitlab the time stats are also returned as a merge +request object attribute:: + + mr = project.mergerequests.get(id) + print(mr.attributes['time_stats']) + +Set a time estimate for a merge request:: + + mr.time_estimate('3h30m') + +Reset a time estimate for a merge request:: + + mr.reset_time_estimate() + +Add spent time for a merge request:: + + mr.add_spent_time('3h30m') + +Reset spent time for a merge request:: + + mr.reset_spent_time() + +Get user agent detail for the issue (admin only):: + + detail = issue.user_agent_detail() |