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

Commit

Permalink
fix(name): pulled from provided vcs details
Browse files Browse the repository at this point in the history
instead of requiring the separate property

for #1
  • Loading branch information
travi committed Jan 28, 2019
1 parent 324d921 commit 3d5064c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/scaffolder.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import chalk from 'chalk';
import writeYaml from '../third-party-wrappers/write-yaml';

export function scaffold({projectRoot, projectName, projectType, description, homepage, visibility}) {
export function scaffold({vcs, projectRoot, projectType, description, homepage, visibility}) {
console.log(chalk.blue('Generating GitHub')); // eslint-disable-line no-console

return writeYaml(`${projectRoot}/.github/settings.yml`, {
repository: {
name: projectName,
name: vcs.name,
description,
homepage,
private: 'Public' !== visibility,
Expand Down
10 changes: 5 additions & 5 deletions test/unit/scaffolder-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ suite('github', () => {
const homepage = any.url();
yamlWriter.default.resolves();

await scaffold({projectRoot, projectName, description, homepage});
await scaffold({projectRoot, vcs: {name: projectName}, description, homepage});

assert.calledWith(
yamlWriter.default,
Expand Down Expand Up @@ -68,7 +68,7 @@ suite('github', () => {
test('that the greenkeeper label is defined for javascript projects', async () => {
yamlWriter.default.resolves();

await scaffold({projectRoot, projectType: 'JavaScript'});
await scaffold({vcs: {}, projectRoot, projectType: 'JavaScript'});

assert.calledWith(
yamlWriter.default,
Expand All @@ -92,7 +92,7 @@ suite('github', () => {
test('that the repository is marked as private when the visibility is `Private`', async () => {
yamlWriter.default.resolves();

await scaffold({projectRoot, projectType: any.word(), visibility: 'Private'});
await scaffold({vcs: {}, projectRoot, projectType: any.word(), visibility: 'Private'});

assert.calledWith(
yamlWriter.default,
Expand All @@ -104,7 +104,7 @@ suite('github', () => {
test('that the repository is marked as not private when the visibility is `Public`', async () => {
yamlWriter.default.resolves();

await scaffold({projectRoot, projectType: any.word(), visibility: 'Public'});
await scaffold({vcs: {}, projectRoot, projectType: any.word(), visibility: 'Public'});

assert.calledWith(
yamlWriter.default,
Expand All @@ -116,7 +116,7 @@ suite('github', () => {
test('that the repository is marked as private when the visibility is not specified', async () => {
yamlWriter.default.resolves();

await scaffold({projectRoot, projectType: any.word()});
await scaffold({vcs: {}, projectRoot, projectType: any.word()});

assert.calledWith(
yamlWriter.default,
Expand Down

0 comments on commit 3d5064c

Please sign in to comment.