An open API service indexing awesome lists of open source software.

https://github.com/travi/github-scaffolder

VCS scaffolder for projects to be hosted on GitHub
https://github.com/travi/github-scaffolder

Last synced: 3 months ago
JSON representation

VCS scaffolder for projects to be hosted on GitHub

Awesome Lists containing this project

README

        

# github-scaffolder

> [!WARNING]
> This package has been deprecated in favor of [`@form8ion/github`](https://github.com/form8ion/github)

VCS scaffolder for projects to be hosted on GitHub

[![Codecov][coverage-badge]][coverage-link]
[![Node CI Workflow Status][github-actions-ci-badge]][github-actions-ci-link]
![SLSA Level 2][slsa-badge]

## Table of Contents

* [Features](#features)
* [Creation of GitHub repository](#creation-of-github-repository)
* [Configuration of GitHub Repository](#configuration-of-github-repository)
* [Filing of issues](#filing-of-issues)
* [Usage](#usage)
* [Installation](#installation)
* [Enabling actions against the GitHub API](#enabling-actions-against-the-github-api)
* [Enabling repository configuration with `probot/settings`](#enabling-repository-configuration-with-probotsettings)
* [Account-level settings](#account-level-settings)
* [Example](#example)
* [Import](#import)
* [Scaffold](#scaffold)
* [API](#api)
* [`projectRoot` __string__ (_required_)](#projectroot-string-required)
* [`name` __string__ (_required_)](#name-string-required)
* [`owner` __string__ (_required_)](#owner-string-required)
* [`description` __string__ (_optional_)](#description-string-optional)
* [`homepage` __string__ (_optional_)](#homepage-string-optional)
* [`visibility` __string__ (_optional_)](#visibility-string-optional)
* [`tags` __list of strings__ (_optional_)](#tags-list-of-strings-optional)
* [`nextSteps` __list of objects__ (_optional_)](#nextsteps-list-of-objects-optional)
* [`summary` __string__ (_required_)](#summary-string-required)
* [`description` __string__ (_optional_)](#description-string-optional-1)
* [Contributing](#contributing)
* [Dependencies](#dependencies)
* [Verification](#verification)

## Features

### Creation of GitHub repository

When [authentication is provided](#enabling-actions-against-the-github-api),
a repository will be created on GitHub, assuming one does not already exist.

### Configuration of GitHub Repository

This tool configures repository settings by generating the settings file for
use by [probot/settings](https://github.com/probot/settings). The settings in
the file will be applied, along with those in the [account-level file](#account-level-settings),
once the generated file is pushed to GitHub in the default branch.

### Filing of issues

Issues will be created in the repository for tasks that should be completed
after acaffolding is complete

## Usage

[![npm][npm-badge]][npm-link]
[![MIT license][license-badge]][license-link]
![node][node-badge]

### Installation

```sh
$ npm install @travi/github-scaffolder --prod
```

### Enabling actions against the GitHub API

This plugin leverages the [.netrc strategy](https://github.com/travi/octokit-auth-netrc)
for [octokit](https://github.com/octokit/rest.js/). Be sure to
[add your personal access token](https://github.com/travi/octokit-auth-netrc#defining-your-token)
to leverage the GitHub API integration benefits of this plugin.

### Enabling repository configuration with `probot/settings`

* Be sure to [install](https://github.com/apps/settings) for the user or
organization account that you are scaffolding the new project for.
* Enable the settings app for all repositories in the account

#### Account-level settings

The settings file generated by this tool assumes that it is extending an
[account level config](https://github.com/probot/probot-config#recipes)

* Ensure that you have created a `.github` repository in your account
* Create an [account-level settings file](https://github.com/probot/settings#inheritance)
in the `.github` repository at the location `.github/settings.yml` within the
repository
* for an organization account, [this is a good example](https://github.com/form8ion/.github/blob/master/.github/settings.yml)
* for a user account, [this is a good example](https://github.com/travi/.github/blob/master/.github/settings.yml)

### Example

#### Import

```javascript
import {scaffold} from '@travi/github-scaffolder';
```

#### Scaffold

```javascript
(async () => {
await scaffold({
projectRoot: process.cwd(),
name: 'foo',
owner: 'travi',
description: 'This is my awesome project',
homepage: 'https://github.com/travi/foo#README',
visibility: 'Public',
tags: ['foo', 'bar'],
nextSteps: [
{summary: 'Do not forget to do this!'},
{
summary: 'Remember to do that',
description: `Take these steps:
- [ ] step 1
- [ ] step 2`
}
]
});
})();
```

### API

#### `projectRoot` __string__ (_required_)

path to the root of the project

#### `name` __string__ (_required_)

Name for the repository

#### `owner` __string__ (_required_)

Name of the account for the repository

#### `description` __string__ (_optional_)

Short description of the project

#### `homepage` __string__ (_optional_)

URL of the project homepage

#### `visibility` __string__ (_optional_)

Whether the repository should be public or private. If provided, must be
'Public' or 'Private'.

#### `tags` __list of strings__ (_optional_)

List of tags to be used as repository topics

#### `nextSteps` __list of objects__ (_optional_)

TODO list to be filed as issues

##### `summary` __string__ (_required_)

String to be used as the title of the created issue

##### `description` __string__ (_optional_)

Markdown content for the in-depth description of the issue

## Contributing

[![Conventional Commits][commit-convention-badge]][commit-convention-link]
[![Commitizen friendly][commitizen-badge]][commitizen-link]
[![semantic-release][semantic-release-badge]][semantic-release-link]
[![PRs Welcome][PRs-badge]][PRs-link]
[![Renovate][renovate-badge]][renovate-link]

### Dependencies

```sh
$ nvm install
$ npm install
```

### Verification

```sh
$ npm test
```

[npm-link]: https://www.npmjs.com/package/@travi/github-scaffolder

[npm-badge]: https://img.shields.io/npm/v/@travi/github-scaffolder?logo=npm

[license-link]: LICENSE

[license-badge]: https://img.shields.io/github/license/travi/github-scaffolder.svg

[coverage-link]: https://codecov.io/github/travi/github-scaffolder

[coverage-badge]: https://img.shields.io/codecov/c/github/travi/github-scaffolder?logo=codecov

[commit-convention-link]: https://conventionalcommits.org

[commit-convention-badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg

[commitizen-link]: http://commitizen.github.io/cz-cli/

[commitizen-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg

[semantic-release-link]: https://github.com/semantic-release/semantic-release

[semantic-release-badge]: https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release

[PRs-link]: http://makeapullrequest.com

[PRs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg

[renovate-link]: https://renovatebot.com

[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot

[github-actions-ci-link]: https://github.com/travi/github-scaffolder/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster

[github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/travi/github-scaffolder/node-ci.yml.svg?branch=master&logo=github

[node-badge]: https://img.shields.io/node/v/@travi/github-scaffolder?logo=node.js

[slsa-badge]: https://slsa.dev/images/gh-badge-level2.svg