diff --git a/.github/workflows/markdown-link-checker.json b/.github/workflows/markdown-link-checker.json index 5f1a93bb..5b2322fd 100644 --- a/.github/workflows/markdown-link-checker.json +++ b/.github/workflows/markdown-link-checker.json @@ -1,5 +1,8 @@ { "ignorePatterns": [ + { + "pattern": "example.org" + }, { "pattern": "gitlab.com/profile" } diff --git a/docs/github-releases.md b/docs/github-releases.md index 045ef1ab..7a50e374 100644 --- a/docs/github-releases.md +++ b/docs/github-releases.md @@ -107,8 +107,8 @@ In case the release should not be made public yet, set `github.draft: true`. Use a different host from what would be derived from the Git url (e.g. when using GitHub Enterprise). -By default, the GitHub API host is https://api.github.com. Setting `github.host` to `"private.source.com"` would result -in release-it using https://private.source.com/api/v3. +By default, the GitHub API host is https://api.github.com. Setting `github.host` to `"private.example.org"` would result +in release-it using https://private.example.org/api/v3. ## Proxy diff --git a/docs/recipes/my-version.md b/docs/recipes/my-version.md index 6c7ee9bf..a1f6f558 100644 --- a/docs/recipes/my-version.md +++ b/docs/recipes/my-version.md @@ -54,7 +54,7 @@ class MyVersionPlugin extends Plugin { if (this.isReleased) { const name = this.getPackageName(); const { version } = this.getContext(); - this.log.log(`🔗 https://example.package-manager.org/${name}/${version}`); + this.log.log(`🔗 https://registry.example.org/${name}/${version}`); } } } diff --git a/test/github.js b/test/github.js index 786fa77a..0584ed60 100644 --- a/test/github.js +++ b/test/github.js @@ -214,7 +214,7 @@ test('should release to enterprise host', async t => { }); test('should release to alternative host and proxy', async t => { - const remote = { api: 'https://my-custom-host.org/api/v3', host: 'my-custom-host.org' }; + const remote = { api: 'https://custom.example.org/api/v3', host: 'custom.example.org' }; interceptAuthentication(remote); interceptCollaborator(remote); interceptCreate(Object.assign({ body: { tag_name: '1.0.1' } }, remote)); @@ -222,8 +222,8 @@ test('should release to alternative host and proxy', async t => { git, github: { tokenRef, - pushRepo: `git://my-custom-host.org:user/repo`, - host: 'my-custom-host.org', + pushRepo: `git://custom.example.org:user/repo`, + host: 'custom.example.org', proxy: 'http://proxy:8080' } }; @@ -235,24 +235,24 @@ test('should release to alternative host and proxy', async t => { const { isReleased, releaseUrl } = github.getContext(); t.true(isReleased); - t.is(releaseUrl, `https://my-custom-host.org/user/repo/releases/tag/1.0.1`); + t.is(releaseUrl, `https://custom.example.org/user/repo/releases/tag/1.0.1`); exec.restore(); }); test('should release to git.pushRepo', async t => { - const remote = { api: 'https://my-custom-host.org/api/v3', host: 'my-custom-host.org' }; + const remote = { api: 'https://custom.example.org/api/v3', host: 'custom.example.org' }; interceptCreate(Object.assign({ body: { tag_name: '1.0.1' } }, remote)); const options = { git: { pushRepo: 'upstream', changelog: '' }, github: { tokenRef, skipChecks: true } }; const github = factory(GitHub, { options }); const exec = sinon.stub(github.shell, 'exec').callThrough(); exec.withArgs('git describe --tags --match=* --abbrev=0').resolves('1.0.0'); - exec.withArgs('git remote get-url upstream').resolves('https://my-custom-host.org/user/repo'); + exec.withArgs('git remote get-url upstream').resolves('https://custom.example.org/user/repo'); await runTasks(github); const { isReleased, releaseUrl } = github.getContext(); t.true(isReleased); - t.is(releaseUrl, 'https://my-custom-host.org/user/repo/releases/tag/1.0.1'); + t.is(releaseUrl, 'https://custom.example.org/user/repo/releases/tag/1.0.1'); exec.restore(); }); @@ -385,10 +385,10 @@ test('should generate GitHub web release url for enterprise host', async t => { const options = { git, github: { - pushRepo: 'git://my-custom-host.org:user/repo', + pushRepo: 'git://custom.example.org:user/repo', release: true, web: true, - host: 'my-custom-host.org', + host: 'custom.example.org', releaseName: 'The Launch', releaseNotes: 'echo It happened' } @@ -403,7 +403,7 @@ test('should generate GitHub web release url for enterprise host', async t => { t.true(isReleased); t.is( releaseUrl, - 'https://my-custom-host.org/user/repo/releases/new?tag=2.0.2&title=The+Launch&body=It+happened&prerelease=false' + 'https://custom.example.org/user/repo/releases/new?tag=2.0.2&title=The+Launch&body=It+happened&prerelease=false' ); exec.restore(); }); diff --git a/test/npm.js b/test/npm.js index a537de85..e23e85f6 100644 --- a/test/npm.js +++ b/test/npm.js @@ -13,9 +13,9 @@ test('should return npm package url', t => { }); test('should return npm package url (custom registry)', t => { - const options = { npm: { name: 'my-cool-package', publishConfig: { registry: 'https://my-registry.com/' } } }; + const options = { npm: { name: 'my-cool-package', publishConfig: { registry: 'https://registry.example.org/' } } }; const npmClient = factory(npm, { options }); - t.is(npmClient.getPackageUrl(), 'https://my-registry.com/package/my-cool-package'); + t.is(npmClient.getPackageUrl(), 'https://registry.example.org/package/my-cool-package'); }); test('should return default tag', async t => { diff --git a/test/tasks.js b/test/tasks.js index 62c4ab75..97f3d927 100644 --- a/test/tasks.js +++ b/test/tasks.js @@ -358,7 +358,7 @@ test.serial('should initially publish non-private scoped npm package privately', test.serial('should use pkg.publishConfig.registry', async t => { const { target } = t.context; const pkgName = path.basename(target); - const registry = 'https://my-registry.com'; + const registry = 'https://my-registry.example.org'; gitAdd( JSON.stringify({