Skip to content
This repository has been archived by the owner on Sep 14, 2019. It is now read-only.

Commit

Permalink
fix(#28): getContent() => getContents()
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetps authored and gr2m committed Nov 27, 2018
1 parent 8952d3e commit a8b74e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions lib/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const getConfig = require('./index');

const { fn } = jest;

function mockContext(getContent) {
function mockContext(getContents) {
return {
repo(params) {
return Object.assign(
Expand All @@ -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,
Expand Down

0 comments on commit a8b74e1

Please sign in to comment.