Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
Update to Probot 9.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcornelissen committed Jul 24, 2020
1 parent 33647eb commit 085d11e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = (robot) => {
})

robot.log.info(`Commiting to repository ${config.targetRepo} on branch ${config.targetBranch}`)
if (process.env.dry !== 'true') context.github.repos.createFile(newCommit)
if (process.env.dry !== 'true') context.github.repos.createOrUpdateFile(newCommit)

processed.push(file)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"base64-stream": "^0.1.3",
"pdfkit": "^0.8.3",
"probot": "^5.0.0",
"probot": "^9.13.0",
"svg-to-pdfkit": "^0.1.6"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ const svg2pdf = require('./svg-to-pdf.js')
module.exports = {
convert: async (context, file, branch) => {
let source = context.repo({path: file, ref: branch})
let content = await context.github.repos.getContent(source)
let content = await context.github.repos.getContents(source)
return svg2pdf(content.data.content)
},

getSHA: async (context, config, file) => {
let target = context.repo({path: file, ref: config.targetBranch, repo: config.targetRepo})
let content = await context.github.repos.getContent(target)
let content = await context.github.repos.getContents(target)
return content.data.sha
}
}

0 comments on commit 085d11e

Please sign in to comment.