diff --git a/src/create.js b/src/create.js index ffa0adab..0c620949 100644 --- a/src/create.js +++ b/src/create.js @@ -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 }); diff --git a/test/unit/create-test.js b/test/unit/create-test.js index c73dd3a5..6434a0ab 100644 --- a/test/unit/create-test.js +++ b/test/unit/create-test.js @@ -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();