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

VCS scaffolder for projects to be hosted on GitHub

License

Notifications You must be signed in to change notification settings

travi/github-scaffolder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-scaffolder

Warning

This package has been deprecated in favor of @form8ion/github

VCS scaffolder for projects to be hosted on GitHub

Codecov Node CI Workflow Status SLSA Level 2

Table of Contents

Features

Creation of GitHub repository

When authentication is provided, 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. The settings in the file will be applied, along with those in the account-level file, 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 MIT license node

Installation

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

Enabling actions against the GitHub API

This plugin leverages the .netrc strategy for octokit. Be sure to add your personal access token to leverage the GitHub API integration benefits of this plugin.

Enabling repository configuration with probot/settings

  • Be sure to install 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

Example

Import

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

Scaffold

(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 Commitizen friendly semantic-release PRs Welcome Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test