From 25a83d829fef85da4e127a2785e599faa331f336 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Wed, 7 Jun 2017 14:38:20 +0200 Subject: [PATCH] Fix baseBranch/defaultBranch in github api (#275) --- lib/api/github.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/github.js b/lib/api/github.js index e9a3302c51..ed1a9efba1 100644 --- a/lib/api/github.js +++ b/lib/api/github.js @@ -423,7 +423,7 @@ async function getFile(filePath, branchName = config.defaultBranch) { return res.body.content; } -async function getFileContent(filePath, branchName = config.baseBranch) { +async function getFileContent(filePath, branchName = config.defaultBranch) { try { const file = await getFile(filePath, branchName); return new Buffer(file, 'base64').toString(); @@ -437,7 +437,7 @@ async function getFileContent(filePath, branchName = config.baseBranch) { } } -async function getFileJson(filePath, branchName = config.baseBranch) { +async function getFileJson(filePath, branchName = config.defaultBranch) { let fileJson = null; try { fileJson = JSON.parse(await getFileContent(filePath, branchName)); -- GitLab