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
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.
-
#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.
-
#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.
99 100 101 |
# File 'lib/gitlab/client/notes.rb', line 99 def create_issue_note(project, issue, body) post("/projects/#{project}/issues/#{issue}/notes", :body => {:body => body}) end |
#create_merge_request_note(project, merge_request, body) ⇒ Object
Creates a new note for a single merge request.
118 119 120 |
# File 'lib/gitlab/client/notes.rb', line 118 def create_merge_request_note(project, merge_request, body) post("/projects/#{project}/merge_requests/#{merge_request}/notes", :body => {:body => body}) end |
#create_note(project, body) ⇒ Gitlab::ObjectifiedHash
Creates a new wall note.
89 90 91 |
# File 'lib/gitlab/client/notes.rb', line 89 def create_note(project, body) post("/projects/#{project}/notes", :body => {:body => body}) end |
#create_snippet_note(project, snippet, body) ⇒ Gitlab::ObjectifiedHash
Creates a new snippet note.
109 110 111 |
# File 'lib/gitlab/client/notes.rb', line 109 def create_snippet_note(project, snippet, body) post("/projects/#{project}/snippets/#{snippet}/notes", :body => {:body => body}) end |
#issue_note(project, issue, id) ⇒ Gitlab::ObjectifiedHash
Gets a single issue note.
67 68 69 |
# File 'lib/gitlab/client/notes.rb', line 67 def issue_note(project, issue, id) get("/projects/#{project}/issues/#{issue}/notes/#{id}") end |
#issue_notes(project, issue, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a issue.
28 29 30 |
# File 'lib/gitlab/client/notes.rb', line 28 def issue_notes(project, issue, ={}) get("/projects/#{project}/issues/#{issue}/notes", :query => ) end |
#note(project, id) ⇒ Gitlab::ObjectifiedHash
Gets a single wall note.
54 55 56 |
# File 'lib/gitlab/client/notes.rb', line 54 def note(project, id) get("/projects/#{project}/notes/#{id}") end |
#notes(project, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of projects notes.
14 15 16 |
# File 'lib/gitlab/client/notes.rb', line 14 def notes(project, ={}) get("/projects/#{project}/notes", :query => ) end |
#snippet_note(project, snippet, id) ⇒ Gitlab::ObjectifiedHash
Gets a single snippet note.
80 81 82 |
# File 'lib/gitlab/client/notes.rb', line 80 def snippet_note(project, snippet, id) get("/projects/#{project}/snippets/#{snippet}/notes/#{id}") end |
#snippet_notes(project, snippet, options = {}) ⇒ Array<Gitlab::ObjectifiedHash>
Gets a list of notes for a snippet.
42 43 44 |
# File 'lib/gitlab/client/notes.rb', line 42 def snippet_notes(project, snippet, ={}) get("/projects/#{project}/snippets/#{snippet}/notes", :query => ) end |