in src/utils.ts [59:78]
function updateOrCreateFile(accessToken: string, contents: string, sha: string) {
const context = github.context
const octokit = github.getOctokit(accessToken);
octokit.rest.repos.createOrUpdateFileContents({
owner: context.repo.owner,
repo: context.repo.repo,
path: COVERAGE_SVG,
message: 'Update coverage file from lcov_gh_badges',
content: contents,
author: {
name: 'GCOV Github Badge',
email: 'build@github.com'
},
sha: sha
}).then(o => {
process.stdout.write("Finished writing file: " + o.data + "\n");
}).catch(e => {
process.stderr.write("Failed to create or update File: " + e.message + "\n");
})
}