Method: Github::Client::Repos::Contents#update

Defined in:
lib/github_api/client/repos/contents.rb

#update(*args) ⇒ Object

Update a file

This method updates 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:

Examples:

github = Github.new
github.repos.contents.update 'user-name', 'repo-name', 'path',
  path: 'hello.rb',
  content: "puts 'hello ruby again'",
  message: "my commit message",
  sha: "25b0bef9e404bd2e3233de26b7ef8cbd86d0e913"

Parameters:



175
176
177
# File 'lib/github_api/client/repos/contents.rb', line 175

def update(*args)
  create(*args)
end