diff --git a/lib/index.js b/lib/index.js index 716c884..f13101e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -45,7 +45,7 @@ function deepMergeConfigs(configs, options) { */ async function loadYaml(context, params) { try { - const response = await context.github.repos.getContent(params); + const response = await context.github.repos.getContents(params); return parseConfig(response.data.content); } catch (e) { if (e.code === 404) { diff --git a/lib/index.test.js b/lib/index.test.js index 1eda097..884179b 100644 --- a/lib/index.test.js +++ b/lib/index.test.js @@ -3,7 +3,7 @@ const getConfig = require('./index'); const { fn } = jest; -function mockContext(getContent) { +function mockContext(getContents) { return { repo(params) { return Object.assign( @@ -17,8 +17,8 @@ function mockContext(getContent) { github: { repos: { - async getContent(params) { - const content = Buffer.from(getContent(params)).toString('base64'); + async getContents(params) { + const content = Buffer.from(getContents(params)).toString('base64'); return { data: { content,