github.rb
def create_git_xml(file_path, issue_id, papers_repo, journal_alias)
    id = "%05d" % issue_id
    crossref_xml_path = "#{journal_alias}.#{id}/10.21105.#{journal_alias}.#{id}.crossref.xml"

    gh_response = github_client.create_contents(papers_repo,
                                                crossref_xml_path,
                                                "Creating 10.21105.#{journal_alias}.#{id}.crossref.xml",
                                                File.open("#{file_path.strip}").read,
                                                :branch => "#{journal_alias}.#{id}")

    return gh_response.content.html_url
  end
# Use the GitHub Contents API (https://developer.github.com/v3/repos/contents/)
# to write the compiled PDF to a named branch.
# Returns the URL to the PDF on GitHub
Use the GitHub Contents API
to write the compiled PDF to a named branch.
Returns the URL to the PDF on GitHub
Use the GitHub Contents API to write the compiled PDF to a named branch . Returns the URL to the PDF on GitHub
def create_git_xml(file_path, issue_id, papers_repo, journal_alias)
    id = "%05d" % issue_id
    crossref_xml_path = "#{journal_alias}.#{id}/10.21105.#{journal_alias}.#{id}.crossref.xml"
    gh_response = github_client.create_contents(papers_repo,
                                                crossref_xml_path,
                                                "Creating 10.21105.#{journal_alias}.#{id}.crossref.xml",
                                                File.open("#{file_path.strip}").read,
                                                :branch => "#{journal_alias}.#{id}")
    return gh_response.content.html_url
  end
def create_git_xml ( file_path , issue_id , papers_repo , journal_alias ) id = "%05d" % issue_id crossref_xml_path = "#{journal_alias}.#{id}/10.21105.#{journal_alias}.#{id}.crossref.xml" gh_response = github_client . create_contents ( papers_repo , crossref_xml_path , "Creating 10.21105.#{journal_alias}.#{id}.crossref.xml" , File . open ( "#{file_path.strip}" ) . read , :branch => "#{journal_alias}.#{id}" ) return gh_response . content . html_url end
Use the GitHub Contents API (https://developer.github.com/v3/repos/contents/)
to write the compiled PDF to a named branch.
Use the GitHub Contents API ( https : // developer . github . com / v3 / repos / contents / ) to write the compiled PDF to a named branch .
file_path
issue_id
papers_repo
journal_alias