@travi/github-scaffolder v10.3.1
github-scaffolder
VCS scaffolder for projects to be hosted on GitHub
Table of Contents
- Features
- Usage
- Contributing
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
Installation
$ npm install @travi/github-scaffolder --prodEnabling 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
- Ensure that you have created a
.githubrepository in your account - Create an account-level settings file
in the
.githubrepository at the location.github/settings.ymlwithin the repository- for an organization account, this is a good example
- for a user account, this is a good example
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
Dependencies
$ nvm install
$ npm installVerification
$ npm test1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago