Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
fix(create): expected the realistic shape for the response
Browse files Browse the repository at this point in the history
for #1
  • Loading branch information
travi committed Feb 4, 2019
1 parent 846fa12 commit 26c064e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {factory} from './github-client-factory';
export default async function (name, visibility) {
console.error(chalk.grey('Creating repository on GitHub')); // eslint-disable-line no-console

const {ssh_url: sshUrl, html_url: htmlUrl} = await factory().repos.createForAuthenticatedUser({
const {data: {ssh_url: sshUrl, html_url: htmlUrl}} = await factory().repos.createForAuthenticatedUser({
name,
private: 'Private' === visibility
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/create-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ suite('creation', () => {
let sandbox;
const sshUrl = any.url();
const htmlUrl = any.url();
const creationResponse = {ssh_url: sshUrl, html_url: htmlUrl};
const creationResponse = {data: {ssh_url: sshUrl, html_url: htmlUrl}};

setup(() => {
sandbox = sinon.createSandbox();
Expand Down

0 comments on commit 26c064e

Please sign in to comment.