Module: Gitlab::Client::Notes
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/notes.rb
Overview
Defines methods related to notes.
Instance Method Summary collapse
-
#create_issue_note(project, issue, body) ⇒ Gitlab::ObjectifiedHash
Creates a new issue note.
-
#create_merge_request_note(project, merge_request, body) ⇒ Object
(also: #create_merge_request_comment)
Creates a new note for a single merge request.
-
#create_note(project, body) ⇒ Gitlab::ObjectifiedHash
Creates a new wall note.
-
#create_snippet_note(project, snippet, body) ⇒ Gitlab::ObjectifiedHash
Creates a new snippet note.
-
#delete_issue_note(project, issue, id) ⇒ Gitlab::ObjectifiedHash
Deletes an issue note.
-
#delete_merge_request_note(project, merge_request, id) ⇒ Gitlab::ObjectifiedHash
(also: #delete_merge_request_comment)
Deletes a merge_request note.
-
#delete_note(project, id) ⇒ Gitlab::ObjectifiedHash
Deletes a wall note.
-
#delete_snippet_note(project, snippet, id) ⇒ Gitlab::ObjectifiedHash
Deletes a snippet note.
-
#edit_issue_note(project, issue, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies an issue note.
-
#edit_merge_request_note(project, merge_request, id, body) ⇒ Gitlab::ObjectifiedHash
(also: #edit_merge_request_comment)
Modifies a merge_request note.
-
#edit_note(project, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies a wall note.
-
#edit_snippet_note(project, snippet, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies a snippet note.
-
#issue_note(project, issue, id) ⇒ Gitlab::ObjectifiedHash
Gets a single issue note.
-
#issue_notes(project, issue, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a issue.
-
#merge_request_note(project, merge_request, id) ⇒ Gitlab::ObjectifiedHash
Gets a single merge_request note.
-
#merge_request_notes(project, merge_request, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
(also: #merge_request_comments)
Gets a list of notes for a merge request.
-
#note(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single wall note.
-
#notes(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of projects notes.
-
#snippet_note(project, snippet, id) ⇒ Gitlab::ObjectifiedHash
Gets a single snippet note.
-
#snippet_notes(project, snippet, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a snippet.
Instance Method Details
#create_issue_note(project, issue, body) ⇒ Gitlab::ObjectifiedHash
Creates a new issue note.
135 136 137 |
# File 'lib/gitlab/client/notes.rb', line 135 def create_issue_note(project, issue, body) post("/projects/#{url_encode project}/issues/#{issue}/notes", body: { body: body }) end |
#create_merge_request_note(project, merge_request, body) ⇒ Object Also known as: create_merge_request_comment
Creates a new note for a single merge request.
160 161 162 |
# File 'lib/gitlab/client/notes.rb', line 160 def create_merge_request_note(project, merge_request, body) post("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes", body: { body: body }) end |
#create_note(project, body) ⇒ Gitlab::ObjectifiedHash
Creates a new wall note.
122 123 124 |
# File 'lib/gitlab/client/notes.rb', line 122 def create_note(project, body) post("/projects/#{url_encode project}/notes", body: { body: body }) end |
#create_snippet_note(project, snippet, body) ⇒ Gitlab::ObjectifiedHash
Creates a new snippet note.
148 149 150 |
# File 'lib/gitlab/client/notes.rb', line 148 def create_snippet_note(project, snippet, body) post("/projects/#{url_encode project}/snippets/#{snippet}/notes", body: { body: body }) end |
#delete_issue_note(project, issue, id) ⇒ Gitlab::ObjectifiedHash
Deletes an issue note.
186 187 188 |
# File 'lib/gitlab/client/notes.rb', line 186 def delete_issue_note(project, issue, id) delete("/projects/#{url_encode project}/issues/#{issue}/notes/#{id}") end |
#delete_merge_request_note(project, merge_request, id) ⇒ Gitlab::ObjectifiedHash Also known as: delete_merge_request_comment
Deletes a merge_request note.
212 213 214 |
# File 'lib/gitlab/client/notes.rb', line 212 def delete_merge_request_note(project, merge_request, id) delete("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes/#{id}") end |
#delete_note(project, id) ⇒ Gitlab::ObjectifiedHash
Deletes a wall note.
173 174 175 |
# File 'lib/gitlab/client/notes.rb', line 173 def delete_note(project, id) delete("/projects/#{url_encode project}/notes/#{id}") end |
#delete_snippet_note(project, snippet, id) ⇒ Gitlab::ObjectifiedHash
Deletes a snippet note.
199 200 201 |
# File 'lib/gitlab/client/notes.rb', line 199 def delete_snippet_note(project, snippet, id) delete("/projects/#{url_encode project}/snippets/#{snippet}/notes/#{id}") end |
#edit_issue_note(project, issue, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies an issue note.
240 241 242 |
# File 'lib/gitlab/client/notes.rb', line 240 def edit_issue_note(project, issue, id, body) put("/projects/#{url_encode project}/issues/#{issue}/notes/#{id}", body: note_content(body)) end |
#edit_merge_request_note(project, merge_request, id, body) ⇒ Gitlab::ObjectifiedHash Also known as: edit_merge_request_comment
Modifies a merge_request note.
268 269 270 |
# File 'lib/gitlab/client/notes.rb', line 268 def edit_merge_request_note(project, merge_request, id, body) put("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes/#{id}", body: note_content(body)) end |
#edit_note(project, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies a wall note.
226 227 228 |
# File 'lib/gitlab/client/notes.rb', line 226 def edit_note(project, id, body) put("/projects/#{url_encode project}/notes/#{id}", body: note_content(body)) end |
#edit_snippet_note(project, snippet, id, body) ⇒ Gitlab::ObjectifiedHash
Modifies a snippet note.
254 255 256 |
# File 'lib/gitlab/client/notes.rb', line 254 def edit_snippet_note(project, snippet, id, body) put("/projects/#{url_encode project}/snippets/#{snippet}/notes/#{id}", body: note_content(body)) end |
#issue_note(project, issue, id) ⇒ Gitlab::ObjectifiedHash
Gets a single issue note.
84 85 86 |
# File 'lib/gitlab/client/notes.rb', line 84 def issue_note(project, issue, id) get("/projects/#{url_encode project}/issues/#{issue}/notes/#{id}") end |
#issue_notes(project, issue, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a issue.
30 31 32 |
# File 'lib/gitlab/client/notes.rb', line 30 def issue_notes(project, issue, = {}) get("/projects/#{url_encode project}/issues/#{issue}/notes", query: ) end |
#merge_request_note(project, merge_request, id) ⇒ Gitlab::ObjectifiedHash
Gets a single merge_request note.
110 111 112 |
# File 'lib/gitlab/client/notes.rb', line 110 def merge_request_note(project, merge_request, id) get("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes/#{id}") end |
#merge_request_notes(project, merge_request, options = {}) ⇒ Array<Gitlab::ObjectifiedHash> Also known as: merge_request_comments
Gets a list of notes for a merge request.
58 59 60 |
# File 'lib/gitlab/client/notes.rb', line 58 def merge_request_notes(project, merge_request, = {}) get("/projects/#{url_encode project}/merge_requests/#{merge_request}/notes", query: ) end |
#note(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single wall note.
71 72 73 |
# File 'lib/gitlab/client/notes.rb', line 71 def note(project, id) get("/projects/#{url_encode project}/notes/#{id}") end |
#notes(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of projects notes.
16 17 18 |
# File 'lib/gitlab/client/notes.rb', line 16 def notes(project, = {}) get("/projects/#{url_encode project}/notes", query: ) end |
#snippet_note(project, snippet, id) ⇒ Gitlab::ObjectifiedHash
Gets a single snippet note.
97 98 99 |
# File 'lib/gitlab/client/notes.rb', line 97 def snippet_note(project, snippet, id) get("/projects/#{url_encode project}/snippets/#{snippet}/notes/#{id}") end |
#snippet_notes(project, snippet, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a snippet.
44 45 46 |
# File 'lib/gitlab/client/notes.rb', line 44 def snippet_notes(project, snippet, = {}) get("/projects/#{url_encode project}/snippets/#{snippet}/notes", query: ) end |