Method: Github::Client::Repos::Contents#delete
- Defined in:
- lib/github_api2/client/repos/contents.rb
#delete(*args) ⇒ Object
Delete a file
This method deletes a file in a repository
Optional Parameters
The :author section is optional and is filled in with the :committer information if omitted. If the :committer information is omitted, the authenticated user’s information is used.
You must provide values for both :name and :email, whether you choose to use :author or :committer. Otherwise, you’ll receive a 500 status code.
Both the author and commiter parameters have the same keys:
219 220 221 222 223 224 225 |
# File 'lib/github_api2/client/repos/contents.rb', line 219 def delete(*args) arguments(args, required: [:user, :repo, :path]) do assert_required %w[ path message sha ] end delete_request("/repos/#{arguments.user}/#{arguments.repo}/contents/#{arguments.path}", arguments.params) end |