Skip to content

Commit 2d2bbf0

Browse files
authored
Merge pull request #5 from form8ion/alpha
2 parents 1ea7c9c + a5e2a8d commit 2d2bbf0

23 files changed

+1264
-40
lines changed

.eslintrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ overrides:
88
- files: ./vitest.config.js
99
rules:
1010
import/no-unresolved: off
11+
12+
parserOptions:
13+
ecmaVersion: 2022

.github/workflows/node-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ jobs:
5353
id-token: write
5454
issues: write
5555
pull-requests: write
56-
uses: form8ion/.github/.github/workflows/release-package.yml@master
56+
uses: form8ion/.github/.github/workflows/release-package-semantic-release-22.yml@master
5757
secrets:
5858
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
id-token: write
1313
issues: write
1414
pull-requests: write
15-
uses: form8ion/.github/.github/workflows/release-package.yml@master
15+
uses: form8ion/.github/.github/workflows/release-package-semantic-release-22.yml@master
1616
secrets:
1717
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20
1+
20.6.1

README.md

+26-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,25 @@ their git repository
1313

1414
## Table of Contents
1515

16+
* [Features](#features)
17+
* [Creation of GitHub repository](#creation-of-github-repository)
1618
* [Usage](#usage)
1719
* [Installation](#installation)
20+
* [Enabling actions against the GitHub API](#enabling-actions-against-the-github-api)
1821
* [Example](#example)
22+
* [Import](#import)
23+
* [Execute](#execute)
1924
* [Contributing](#contributing)
2025
* [Dependencies](#dependencies)
2126
* [Verification](#verification)
2227

28+
## Features
29+
30+
### Creation of GitHub repository
31+
32+
When [authentication is provided](#enabling-actions-against-the-github-api),
33+
a repository will be created on GitHub, assuming one does not already exist.
34+
2335
## Usage
2436

2537
<!--consumer-badges start -->
@@ -37,20 +49,31 @@ their git repository
3749
$ npm install @form8ion/github --save-prod
3850
```
3951

52+
### Enabling actions against the GitHub API
53+
54+
This plugin leverages the [.netrc strategy](https://github.com/travi/octokit-auth-netrc)
55+
for [octokit](https://github.com/octokit/rest.js/). Be sure to
56+
[add your personal access token](https://github.com/travi/octokit-auth-netrc#defining-your-token)
57+
to leverage the GitHub API integration benefits of this plugin.
58+
4059
### Example
4160

4261
#### Import
4362

4463
```javascript
4564
import {scaffold} from '@form8ion/github';
65+
import any from '@travi/any';
4666
```
4767

4868
#### Execute
4969

5070
```javascript
51-
(async () => {
52-
await scaffold({projectRoot: process.cwd()});
53-
})();
71+
await scaffold({
72+
projectRoot: process.cwd(),
73+
name: 'foo',
74+
owner: 'travi',
75+
visibility: any.fromList(['Public', 'Private'])
76+
});
5477
```
5578

5679
## Contributing

example.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// #### Import
2-
// remark-usage-ignore-next
2+
// remark-usage-ignore-next 2
3+
import {resolve} from 'path';
34
import stubbedFs from 'mock-fs';
5+
import any from '@travi/any';
46
import {scaffold} from './lib/index.js';
57

68
// remark-usage-ignore-next
7-
stubbedFs();
9+
stubbedFs({node_modules: stubbedFs.load(resolve('node_modules'))});
810

911
// #### Execute
1012

11-
(async () => {
12-
await scaffold({projectRoot: process.cwd()});
13-
})();
13+
await scaffold({
14+
projectRoot: process.cwd(),
15+
name: 'foo',
16+
owner: 'travi',
17+
visibility: any.fromList(['Public', 'Private'])
18+
});

0 commit comments

Comments
 (0)