module Octokit::Client::Contents
def delete_contents(repo, path, message, sha, options = {})
- Example: Delete content at lib/octokit.rb -
Other tags:
- See: https://developer.github.com/v3/repos/contents/#delete-a-file -
Returns:
-
(Sawyer::Resource)- The commit info for the delete
Options Hash:
(**options)-
:branch(String) -- The branch on which to delete the content
Parameters:
-
sha(String) -- The _blob sha_ of the content to delete -
message(String) -- A commit message for deleting the content -
path(String) -- A path for the content to delete -
repo(Integer, String, Repository, Hash) -- A GitHub repository
def delete_contents(repo, path, message, sha, options = {}) options[:message] = message options[:sha] = sha url = "#{Repository.path repo}/contents/#{path}" delete url, options end