From f4702c49ac70abb3e5b177b5ddbddb1e9695944c Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Wed, 1 Mar 2023 14:19:53 +0100 Subject: [PATCH] Replace master with main where applicable --- .github/CONTRIBUTING.md | 2 +- .github/workflows/markdown-link-checker.yml | 4 ++-- CHANGELOG.md | 4 ++-- docs/changelog.md | 2 +- docs/ci.md | 2 +- docs/configuration.md | 2 +- docs/git.md | 14 +++++++------- docs/plugins.md | 8 ++++---- docs/recipes/auto-changelog.md | 8 ++++---- test/stub/github.js | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0d053eb7..d80bb748 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -29,7 +29,7 @@ context as possible. In case you've encountered a bug, please make sure: - You are using the [latest version](https://github.com/release-it/release-it/releases). -- You have read the [documentation](https://github.com/release-it/release-it/blob/master/README.md) first, and +- You have read the [documentation](https://github.com/release-it/release-it/blob/main/README.md) first, and double-checked your configuration. - You have acknowledged from [Troubleshooting & debugging](../README.md#troubleshooting--debugging) the errors are likely a bug in this project, and not coming from e.g. your environment or custom scripts/commands. diff --git a/.github/workflows/markdown-link-checker.yml b/.github/workflows/markdown-link-checker.yml index 2a697d13..79af6132 100644 --- a/.github/workflows/markdown-link-checker.yml +++ b/.github/workflows/markdown-link-checker.yml @@ -3,7 +3,7 @@ name: Check Markdown links on: push: branches: - - master + - main tags: - '!**' schedule: @@ -13,7 +13,7 @@ jobs: markdown-link-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@main - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: config-file: .github/workflows/markdown-link-checker.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 55645802..25d3cc6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ Use release-it v14 in legacy environments. - The custom `conventional-changelog` increment (e.g. `"increment": "conventional:angular"`) with additional script configuration is replaced with a plugin. Please see - [conventional changelog](https://github.com/release-it/release-it/blob/master/docs/changelog.md#conventional-changelog) + [conventional changelog](https://github.com/release-it/release-it/blob/main/docs/changelog.md#conventional-changelog) how to use this plugin. - The `pkgFiles` option has been removed. If there's a need to bump other files than what `npm version` bumps, it should be (part of) a plugin. @@ -49,7 +49,7 @@ Use release-it v14 in legacy environments. - Dropped support for Node v6 - Deprecated options from v9 are removed, the `dist.repo` config in particular (also see - [distribution repository](https://github.com/release-it/release-it/blob/master/docs/recipes/distribution-repo.md) for + [distribution repository](https://github.com/release-it/release-it/blob/main/docs/recipes/distribution-repo.md) for alternatives). - Drop the `--debug` flag. `DEBUG=release-it:* ...` still works. diff --git a/docs/changelog.md b/docs/changelog.md index 7435c0f4..8cd43d70 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -28,7 +28,7 @@ For this, [auto-changelog](https://github.com/CookPete/auto-changelog) is a grea ```json { "git": { - "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs" + "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs" }, "hooks": { "after:bump": "npx auto-changelog -p" diff --git a/docs/ci.md b/docs/ci.md index 29144e1a..7c87efa8 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -31,7 +31,7 @@ origin url before running release-it. An example is this `.travis.yml` section: script: - git remote rm origin - git remote add origin https://[user]:${GITHUB_TOKEN}@github.com/[user]/[project].git - - git symbolic-ref HEAD refs/heads/master + - git symbolic-ref HEAD refs/heads/main ``` Replace `[user]` and `[project]` with the actual values. diff --git a/docs/configuration.md b/docs/configuration.md index cf4cca72..e6defca6 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -59,7 +59,7 @@ TOML is also supported in `.release-it.toml`: Any option can also be set on the command-line, and will have highest priority. Example: ```bash -release-it minor --git.requireBranch=master --github.release +release-it minor --git.requireBranch=main --github.release ``` Boolean arguments can be negated by using the `no-` prefix: diff --git a/docs/git.md b/docs/git.md index 66f6ecee..b92b11cc 100644 --- a/docs/git.md +++ b/docs/git.md @@ -61,8 +61,8 @@ Example: `git.tagMatch: "[0-9][0-9].[0-1][0-9].[0-9]*"` ## Tag Exclude -Use `git.tagExclude` to override the normal behavior to find the latest tag. For example whendoing a major release and -you want to exclude any sort of pre-releases, use `*[-]*`, as this would exclude everything with a hyphen, which is +Use `git.tagExclude` to override the normal behavior to find the latest tag. For example whendoing a major release and +you want to exclude any sort of pre-releases, use `*[-]*`, as this would exclude everything with a hyphen, which is normally used exclusively in pre-releases. Example: `git.tagExclude: *[-]*` @@ -109,7 +109,7 @@ This is disabled by default, but release-it can exit the process when the curren ```json { "git": { - "requireBranch": "master" + "requireBranch": "main" } } ``` @@ -122,8 +122,8 @@ The working directory should be clean (i.e. `git status` should say something li ```bash $ git status -On branch master -Your branch is up to date with 'origin/master'. +On branch main +Your branch is up to date with 'origin/main'. nothing to commit, working tree clean ``` @@ -145,8 +145,8 @@ Configure `pushRepo` with either a remote name or a Git url to push the release Disabling `git.requireUpstream` is useful when releasing from a different branch (that is not yet tracking cq present on a remote). Or similar, when releasing a (new) project that did not push to the remote before. Please note that in -general you should not need this, as it is considered a best practice to release from the `master` branch only. Here is -an example use case and how it can be handled using release-it: +general you should not need this, as it is considered a best practice to release from the `main` branch only. Here is an +example use case and how it can be handled using release-it: - After a major release (v2), a bug is found and a fix released in v2.0.1. - The fix should be backported to v1, so a branch "v1" is made and the fix is cherry-picked. diff --git a/docs/plugins.md b/docs/plugins.md index a61628c0..aab8adb2 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -79,8 +79,8 @@ Alternatively, here's a `release-it-plugin` as a local module: To create a plugin, extend the `Plugin` class, and implement one or more release-cycle methods. See the "interface" below (where none of the methods is required). Any of these methods can be `async`. See this -[test helper](https://github.com/release-it/release-it/blob/master/test/util/index.js#L54) to get an idea of the methods -a release-it plugin can implement. +[test helper](https://github.com/release-it/release-it/blob/main/test/util/index.js#L54) to get an idea of the methods a +release-it plugin can implement. Note that `release-it` should be a `peerDependency` (and probably also a `devDependency` to use its helpers in the plugin tests). Here's an example `package.json`: @@ -378,5 +378,5 @@ Here's an example: ## Available & example plugins - All packages tagged with [`"release-it-plugin"` on npm](https://www.npmjs.com/search?q=keywords:release-it-plugin). -- Recipe: [my-version](https://github.com/release-it/release-it/blob/master/docs/recipes/my-version.md) - example plugin -- [Internal release-it plugins](https://github.com/release-it/release-it/tree/master/lib/plugin) +- Recipe: [my-version](https://github.com/release-it/release-it/blob/main/docs/recipes/my-version.md) - example plugin +- [Internal release-it plugins](https://github.com/release-it/release-it/tree/main/lib/plugin) diff --git a/docs/recipes/auto-changelog.md b/docs/recipes/auto-changelog.md index 6ad57a9d..1af56be5 100644 --- a/docs/recipes/auto-changelog.md +++ b/docs/recipes/auto-changelog.md @@ -15,7 +15,7 @@ Example configuration in the release-it config: ```json { "git": { - "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs" + "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs" }, "hooks": { "after:bump": "npx auto-changelog -p" @@ -51,7 +51,7 @@ The template above [changelog-compact.hbs](../../templates/changelog-compact.hbs ```json { "git": { - "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs" + "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs" }, "hooks": { "after:bump": "npx auto-changelog -p" @@ -65,10 +65,10 @@ Projects without a `package.json` that need to generate a `CHANGELOG.md` compati ```json { "git": { - "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs" + "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs" }, "hooks": { - "after:bump": "npx auto-changelog --commit-limit false --template https://raw.githubusercontent.com/release-it/release-it/master/templates/keepachangelog.hbs" + "after:bump": "npx auto-changelog --commit-limit false --template https://raw.githubusercontent.com/release-it/release-it/main/templates/keepachangelog.hbs" } } ``` diff --git a/test/stub/github.js b/test/stub/github.js index ca5af285..3dd465cc 100644 --- a/test/stub/github.js +++ b/test/stub/github.js @@ -30,7 +30,7 @@ const interceptListReleases = ({ upload_url: `https://uploads.${host}/repos/${owner}/${project}/releases/1/assets{?name,label}`, html_url: `https://${host}/${owner}/${project}/releases/tag/${tag_name}`, tag_name, - target_commitish: 'master', + target_commitish: 'main', name: `Release ${tag_name}`, body: 'Description of the release', draft: false,