diff options
-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() |