Skip to content

Commit d5aa119

Browse files
committed
fix: fix typos and capitalization
1 parent 81506f8 commit d5aa119

File tree

8 files changed

+40
-41
lines changed

8 files changed

+40
-41
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @semantic-release/github
22

3-
Set of [semantic-release](https://github.com/semantic-release/semantic-release) plugins for publishing a
4-
[Github release](https://help.github.com/articles/about-releases).
3+
Set of [Semantic-release](https://github.com/semantic-release/semantic-release) plugins for publishing a
4+
[GitHub release](https://help.github.com/articles/about-releases).
55

66
[![Travis](https://img.shields.io/travis/semantic-release/github.svg)](https://travis-ci.org/semantic-release/github)
77
[![Codecov](https://img.shields.io/codecov/c/github/semantic-release/github.svg)](https://codecov.io/gh/semantic-release/github)
@@ -14,17 +14,16 @@ the [assets](#assets) option configuration.
1414

1515
## publish
1616

17-
Publish a [Github release](https://help.github.com/articles/about-releases), optionally uploading files.
17+
Publish a [GitHub release](https://help.github.com/articles/about-releases), optionally uploading files.
1818

1919
## Configuration
2020

21-
### Github Repository authentication
21+
### GitHub authentication
2222

23-
The `Github` authentication configuration is **required** and can be set via
23+
The GitHub authentication configuration is **required** and can be set via
2424
[environment variables](#environment-variables).
2525

26-
Only the [personal token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)
27-
authentication is supported.
26+
Follow the [Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) documentation to obtain an authentication token. The token has to be made available in your CI environment via the `GH_TOKEN` environment variable.
2827

2928
### Environment variables
3029

@@ -50,16 +49,16 @@ Can be a [glob](https://github.com/isaacs/node-glob#glob-primer) or and `Array`
5049
| Property | Description | Default |
5150
| -------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------ |
5251
| `path` | **Required.** A [glob](https://github.com/isaacs/node-glob#glob-primer) to identify the files to upload. | - |
53-
| `name` | The name of the downloadable file on the Github release. | File name extracted from the `path`. |
54-
| `label` | Short description of the file displayed on the Github release. | - |
52+
| `name` | The name of the downloadable file on the GitHub release. | File name extracted from the `path`. |
53+
| `label` | Short description of the file displayed on the GitHub release. | - |
5554

5655
Each entry in the `assets` `Array` is globbed individually. A [glob](https://github.com/isaacs/node-glob#glob-primer)
5756
can be a `String` (`"dist/**/*.js"` or `"dist/mylib.js"`) or an `Array` of `String`s that will be globbed together
5857
(`["dist/**", "!**/*.css"]`).
5958

6059
If a directory is configured, all the files under this directory and its children will be included.
6160

62-
Files can be included enven if they have a match in `.gitignore`.
61+
Files can be included even if they have a match in `.gitignore`.
6362

6463
##### `assets` examples
6564

@@ -70,15 +69,15 @@ files.
7069

7170
`[{path: 'dist/MyLibrary.js', label: 'MyLibrary JS distribution'}, {path: 'dist/MyLibrary.css', label: 'MyLibrary CSS
7271
distribution'}]`: include the `dist/MyLibrary.js` and `dist/MyLibrary.css` files, and label them `MyLibrary JS
73-
distribution` and `MyLibrary CSS distribution` in the Github release.
72+
distribution` and `MyLibrary CSS distribution` in the GitHub release.
7473

7574
`[['dist/**/*.{js,css}', '!**/*.min.*'], {path: 'build/MyLibrary.zip', label: 'MyLibrary'}]`: include all the `js` and
7675
`css` files in the `dist` directory and its sub-directories excluding the minified version, plus the
77-
`build/MyLibrary.zip` file and label it `MyLibrary` in the Github release.
76+
`build/MyLibrary.zip` file and label it `MyLibrary` in the GitHub release.
7877

7978
### Usage
8079

81-
The plugins are used by default by [semantic-release](https://github.com/semantic-release/semantic-release) so no
80+
The plugins are used by default by [Semantic-release](https://github.com/semantic-release/semantic-release) so no
8281
specific configuration is required if `githubUrl` and `githubApiPathPrefix` are set via environment variable.
8382

8483
Each individual plugin can be disabled, replaced or used with other plugins in the `package.json`:
@@ -93,7 +92,7 @@ Each individual plugin can be disabled, replaced or used with other plugins in t
9392
}
9493
```
9594

96-
Options can be set within the plugin definition in the `semantic-release` configuration file:
95+
Options can be set within the plugin definition in the Semantic-release configuration file:
9796

9897
```json
9998
{

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
const verifyGithub = require('./lib/verify');
2-
const publishGithub = require('./lib/publish');
1+
const verifyGitHub = require('./lib/verify');
2+
const publishGitHub = require('./lib/publish');
33

44
let verified;
55

66
async function verifyConditions(pluginConfig, {options, logger}) {
7-
// If the Github publish plugin is used and has `assets` configured, validate it now in order to prevent any release if the configuration is wrong
7+
// If the GitHub publish plugin is used and has `assets` configured, validate it now in order to prevent any release if the configuration is wrong
88
if (options.publish) {
99
const publishPlugin = (Array.isArray(options.publish) ? options.publish : [options.publish]).find(
1010
config => config.path && config.path === '@semantic-release/github'
@@ -14,16 +14,16 @@ async function verifyConditions(pluginConfig, {options, logger}) {
1414
}
1515
}
1616

17-
await verifyGithub(pluginConfig, options, logger);
17+
await verifyGitHub(pluginConfig, options, logger);
1818
verified = true;
1919
}
2020

2121
async function publish(pluginConfig, {nextRelease, options, logger}) {
2222
if (!verified) {
23-
await verifyGithub(pluginConfig, options, logger);
23+
await verifyGitHub(pluginConfig, options, logger);
2424
verified = true;
2525
}
26-
await publishGithub(pluginConfig, options, nextRelease, logger);
26+
await publishGitHub(pluginConfig, options, nextRelease, logger);
2727
}
2828

2929
module.exports = {verifyConditions, publish};

lib/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = async (pluginConfig, {branch, repositoryUrl}, {version, gitHead
3636
}
3737

3838
const {data: {html_url: htmlUrl, upload_url: uploadUrl}} = await github.repos.createRelease(release);
39-
logger.log('Published Github release: %s', htmlUrl);
39+
logger.log('Published GitHub release: %s', htmlUrl);
4040

4141
if (assets && assets.length > 0) {
4242
const globbedAssets = await globAssets(assets);

lib/verify.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ module.exports = async (pluginConfig, {repositoryUrl}, logger) => {
2929
const {name: repo, owner} = parseGithubUrl(repositoryUrl);
3030
if (!owner || !repo) {
3131
throw new SemanticReleaseError(
32-
`The git repository URL ${repositoryUrl} is not a valid Github URL.`,
32+
`The git repository URL ${repositoryUrl} is not a valid GitHub URL.`,
3333
'EINVALIDGITURL'
3434
);
3535
}
3636

3737
if (githubUrl) {
38-
logger.log('Verify Github authentication (%s)', urlJoin(githubUrl, githubApiPathPrefix));
38+
logger.log('Verify GitHub authentication (%s)', urlJoin(githubUrl, githubApiPathPrefix));
3939
} else {
40-
logger.log('Verify Github authentication');
40+
logger.log('Verify GitHub authentication');
4141
}
4242

4343
const github = getClient(githubToken, githubUrl, githubApiPathPrefix);
@@ -47,7 +47,7 @@ module.exports = async (pluginConfig, {repositoryUrl}, logger) => {
4747
({data: {permissions: {push}}} = await github.repos.get({repo, owner}));
4848
} catch (err) {
4949
if (err.code === 401) {
50-
throw new SemanticReleaseError('Invalid Github token.', 'EINVALIDGHTOKEN');
50+
throw new SemanticReleaseError('Invalid GitHub token.', 'EINVALIDGHTOKEN');
5151
} else if (err.code === 404) {
5252
throw new SemanticReleaseError(`The repository ${owner}/${repo} doesn't exist.`, 'EMISSINGREPO');
5353
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@semantic-release/github",
3-
"description": "Set of semantic-release plugins for publishing a Github release",
3+
"description": "Set of semantic-release plugins for publishing a GitHub release",
44
"version": "0.0.0-development",
55
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
66
"bugs": {

test/integration.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test.afterEach.always(() => {
3636
nock.cleanAll();
3737
});
3838

39-
test.serial('Verify Github auth', async t => {
39+
test.serial('Verify GitHub auth', async t => {
4040
process.env.GITHUB_TOKEN = 'github_token';
4141
const owner = 'test_user';
4242
const repo = 'test_repo';
@@ -50,7 +50,7 @@ test.serial('Verify Github auth', async t => {
5050
t.true(github.isDone());
5151
});
5252

53-
test.serial('Verify Github auth with publish options', async t => {
53+
test.serial('Verify GitHub auth with publish options', async t => {
5454
process.env.GITHUB_TOKEN = 'github_token';
5555
const owner = 'test_user';
5656
const repo = 'test_repo';
@@ -67,7 +67,7 @@ test.serial('Verify Github auth with publish options', async t => {
6767
t.true(github.isDone());
6868
});
6969

70-
test.serial('Verify Github auth and assets config', async t => {
70+
test.serial('Verify GitHub auth and assets config', async t => {
7171
process.env.GH_TOKEN = 'github_token';
7272
const owner = 'test_user';
7373
const repo = 'test_repo';
@@ -153,16 +153,16 @@ test.serial('Publish a release with an array of assets', async t => {
153153

154154
await t.context.m.publish({assets}, {nextRelease, options, logger: t.context.logger});
155155

156-
t.deepEqual(t.context.log.args[0], ['Verify Github authentication']);
157-
t.deepEqual(t.context.log.args[1], ['Published Github release: %s', releaseUrl]);
156+
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication']);
157+
t.deepEqual(t.context.log.args[1], ['Published GitHub release: %s', releaseUrl]);
158158
t.deepEqual(t.context.log.args[2], ['Published file %s', assetUrl]);
159159
t.deepEqual(t.context.log.args[3], ['Published file %s', otherAssetUrl]);
160160
t.true(github.isDone());
161161
t.true(githubUpload1.isDone());
162162
t.true(githubUpload2.isDone());
163163
});
164164

165-
test.serial('Verify Github auth and release', async t => {
165+
test.serial('Verify GitHub auth and release', async t => {
166166
process.env.GH_TOKEN = 'github_token';
167167
const owner = 'test_user';
168168
const repo = 'test_repo';
@@ -212,8 +212,8 @@ test.serial('Verify Github auth and release', async t => {
212212
await t.notThrows(t.context.m.verifyConditions({}, {options, logger: t.context.logger}));
213213
await t.context.m.publish({assets}, {nextRelease, options, logger: t.context.logger});
214214

215-
t.deepEqual(t.context.log.args[0], ['Verify Github authentication']);
216-
t.deepEqual(t.context.log.args[1], ['Published Github release: %s', releaseUrl]);
215+
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication']);
216+
t.deepEqual(t.context.log.args[1], ['Published GitHub release: %s', releaseUrl]);
217217
t.deepEqual(t.context.log.args[2], ['Published file %s', otherAssetUrl]);
218218
t.deepEqual(t.context.log.args[3], ['Published file %s', assetUrl]);
219219
t.true(github.isDone());

test/publish.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test.serial('Publish a release', async t => {
6060

6161
await publish(pluginConfig, options, nextRelease, t.context.logger);
6262

63-
t.deepEqual(t.context.log.args[0], ['Published Github release: %s', releaseUrl]);
63+
t.deepEqual(t.context.log.args[0], ['Published GitHub release: %s', releaseUrl]);
6464
t.true(github.isDone());
6565
});
6666

@@ -89,7 +89,7 @@ test.serial('Publish a release with an existing tag', async t => {
8989

9090
await publish(pluginConfig, options, nextRelease, t.context.logger);
9191

92-
t.deepEqual(t.context.log.args[0], ['Published Github release: %s', releaseUrl]);
92+
t.deepEqual(t.context.log.args[0], ['Published GitHub release: %s', releaseUrl]);
9393
t.true(github.isDone());
9494
});
9595

@@ -130,7 +130,7 @@ test.serial('Publish a release with one asset', async t => {
130130

131131
await publish(pluginConfig, options, nextRelease, t.context.logger);
132132

133-
t.deepEqual(t.context.log.args[0], ['Published Github release: %s', releaseUrl]);
133+
t.deepEqual(t.context.log.args[0], ['Published GitHub release: %s', releaseUrl]);
134134
t.deepEqual(t.context.log.args[1], ['Published file %s', assetUrl]);
135135
t.true(github.isDone());
136136
t.true(githubUpload.isDone());
@@ -182,7 +182,7 @@ test.serial('Publish a release with one asset and custom github url', async t =>
182182

183183
await publish(pluginConfig, options, nextRelease, t.context.logger);
184184

185-
t.deepEqual(t.context.log.args[0], ['Published Github release: %s', releaseUrl]);
185+
t.deepEqual(t.context.log.args[0], ['Published GitHub release: %s', releaseUrl]);
186186
t.deepEqual(t.context.log.args[1], ['Published file %s', assetUrl]);
187187
t.true(github.isDone());
188188
t.true(githubUpload.isDone());
@@ -216,7 +216,7 @@ test.serial('Publish a release with an array of missing assets', async t => {
216216

217217
await publish(pluginConfig, options, nextRelease, t.context.logger);
218218

219-
t.deepEqual(t.context.log.args[0], ['Published Github release: %s', releaseUrl]);
219+
t.deepEqual(t.context.log.args[0], ['Published GitHub release: %s', releaseUrl]);
220220
t.deepEqual(t.context.error.args[0], [
221221
'The asset %s cannot be read, and will be ignored.',
222222
'test/fixtures/missing.txt',

test/verify.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test.serial('Verify package, token and repository access and custom URL', async
6363
);
6464

6565
t.true(github.isDone());
66-
t.deepEqual(t.context.log.args[0], ['Verify Github authentication (%s)', 'https://othertesturl.com:9090/prefix']);
66+
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication (%s)', 'https://othertesturl.com:9090/prefix']);
6767
});
6868

6969
test.serial('Verify package, token and repository with environment variables', async t => {
@@ -79,7 +79,7 @@ test.serial('Verify package, token and repository with environment variables', a
7979
await t.notThrows(verify({}, {repositoryUrl: `git@othertesturl.com:${owner}/${repo}.git`}, t.context.logger));
8080

8181
t.true(github.isDone());
82-
t.deepEqual(t.context.log.args[0], ['Verify Github authentication (%s)', 'https://othertesturl.com:443/prefix']);
82+
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication (%s)', 'https://othertesturl.com:443/prefix']);
8383
});
8484

8585
test.serial('Verify package, token and repository access with alternative environment varialbes', async t => {

0 commit comments

Comments
 (0)