lib/octofacts_updater/service/github.rb
# Finalize the GitHub commit by actually pushing any of the changes. This will not do anything if there
# are not any changes batched via the `commit_data` method.
#
# message - A String with a commit message, defaults to the overall configured commit message.
Finalize the GitHub commit by actually pushing any of the changes. This will not do anything if there
are not any changes batched via the `commit_data` method.

A String with a commit message, defaults to the overall configured commit message.
Finalize the GitHub commit by actually pushing any of the changes . This will not do anything if there are not any changes batched via the ` commit_data ` method . A String with a commit message defaults to the overall configured commit message .
def finalize_commit(message = commit_message)
        return unless @changes.any?
        ensure_branch_exists
        branch_ref = octokit.branch(repository, branch)
        commit = octokit.git_commit(repository, branch_ref[:commit][:sha])
        tree = commit["tree"]
        new_tree = octokit.create_tree(repository, @changes, base_tree: tree["sha"])
        new_commit = octokit.create_commit(repository, message, new_tree["sha"], commit["sha"])
        octokit.update_ref(repository, "heads/#{branch}", new_commit["sha"])
        verbose("Committed #{@changes.size} change(s) to GitHub")
        find_or_create_pull_request
      end
def finalize_commit ( message = commit_message ) return unless @changes . any? ensure_branch_exists branch_ref = octokit . branch ( repository , branch ) commit = octokit . git_commit ( repository , branch_ref [ :commit ] [ :sha ] ) tree = commit [ "tree" ] new_tree = octokit . create_tree ( repository , @changes , base_tree : tree [ "sha" ] ) new_commit = octokit . create_commit ( repository , message , new_tree [ "sha" ] , commit [ "sha" ] ) octokit . update_ref ( repository , "heads/#{branch}" , new_commit [ "sha" ] ) verbose ( "Committed #{@changes.size} change(s) to GitHub" ) find_or_create_pull_request end
Finalize the GitHub commit by actually pushing any of the changes.
Finalize the GitHub commit by actually pushing any of the changes .
message
<not_specific>
commit_message
<not_specific>