Learn R Programming

gitlabr (version 0.9)

gl_get_comments: Get the comments/notes of a commit or issue

Description

Get the comments/notes of a commit or issue

Usage

gl_get_comments(object_type = "issue", id, note_id = c(), project, ...)

gl_get_issue_comments(...)

gl_get_commit_comments(...)

gl_comment_commit(project, id, text, ...)

gl_comment_issue(project, id, text, ...)

gl_edit_comment(object_type, text, ...)

gl_edit_issue_comment(...)

gl_edit_commit_comment(...)

Arguments

object_type

one of "issue" or "commit". Snippets and merge_requests are not implemented yet.

id

id of object: sha for commits, not issues notes/comments: (project-wide) id for api version 4, (global) iid for api version 3

note_id

id of note

project

project name or id

...

passed on to gitlab API call. See Details.

text

Text of comment/note to add or edit (translates to gitlab API note/body respectively)

Details

For gl_comment_commit ... might also contain path, line and line_type (old or new) to attach the comment to a specific in a file. See http://doc.gitlab.com/ce/api/commits.html

Examples

Run this code
# NOT RUN {
my_project <- gl_project_connection(project = "testor"...) ## fill in login parameters
my_project(gl_get_comments, "issue", 1)
my_project(gl_get_comments, "commit", "8ce5ef240123cd78c1537991e5de8d8323666b15")
my_project(gl_comment_issue, 1, text = "Almost done!")
# }

Run the code above in your browser using DataLab