class Ossy::CLI::Github::UpdateFile
Public Instance Methods
call(repo:, file:, branch:)
click to toggle source
# File lib/ossy/cli/github/update_file.rb, line 16 def call(repo:, file:, branch:) url = "https://raw.githubusercontent.com/#{repo}/#{branch}/shared/#{file}" content = open(url).read puts "Writing to #{file}" File.write("./#{file}", content) system "git commit #{file} -m 'Update #{file}'" end