Method: Gitlab::Client::Notes#create_snippet_note

Defined in:
lib/gitlab/client/notes.rb

#create_snippet_note(project, snippet, body) ⇒ Gitlab::ObjectifiedHash

Creates a new snippet note.

Examples:

Gitlab.create_snippet_note(3, 2, 'Look at this awesome snippet!')

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • snippet (Integer)

    The ID of a snippet.

  • body (String)

    The body of a note.

Returns:


162
163
164
# File 'lib/gitlab/client/notes.rb', line 162

def create_snippet_note(project, snippet, body)
  post("/projects/#{url_encode project}/snippets/#{snippet}/notes", body: { body: body })
end