diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index dc0794ae..e2327ae4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,18 +11,18 @@ Resolves #ISSUE_NUMBER ### Before the change? -* +* ### After the change? -* +* ### Other information -* +* ---- @@ -36,20 +36,20 @@ Resolves #ISSUE_NUMBER ### Does this introduce a breaking change? -Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/master/community/breaking_changes.md) to help! +Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/main/community/breaking_changes.md) to help! - [ ] Yes (Please add the `Type: Breaking change` label) - [ ] No -If `Yes`, what's the impact: +If `Yes`, what's the impact: * N/A ### Pull request type - - + + Please add the corresponding label for change this PR introduces: - Bugfix: `Type: Bug` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe2fe746..1b7e1c8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ "on": push: branches: - - master + - main - next - beta - "*.x" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9466d5ef..abc7a0c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test "on": push: branches: - - master + - main - next - beta - dependabot/npm_and_yarn/** diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 26cb840d..30ca3574 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -1,8 +1,8 @@ -name: Update docs on pushes to master +name: Update docs on pushes to main "on": push: branches: - - master + - main jobs: update_docs: runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc9191a7..454ce8de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,14 +48,14 @@ variable (or set it in a `.env` file) to avoid running against GitHub's rate lim Here is an overview of [how `@octokit/rest` works](HOW_IT_WORKS.md). -- Create a topic branch from the master branch. +- Create a topic branch from the main branch. - Check for unnecessary whitespace / changes with `git diff --check` before committing. - Keep git commit messages clear and appropriate. Ideally follow commit conventions described below. ## Submitting the Pull Request - Push your changes to your topic branch on your fork of the repo. -- Submit a pull request from your topic branch to the master branch on the `rest.js` repository. +- Submit a pull request from your topic branch to the main branch on the `rest.js` repository. - Be sure to tag any issues your pull request is taking care of / contributing to. \* Adding "Closes #123" to a pull request description will auto close the issue once the pull request is merged in. ## Testing a pull request from github repo locally: diff --git a/HOW_IT_WORKS.md b/HOW_IT_WORKS.md index 42c92b9b..f96632b1 100644 --- a/HOW_IT_WORKS.md +++ b/HOW_IT_WORKS.md @@ -15,9 +15,9 @@ ## Endpoint options (① - ④) -`@octokit/rest` exposes a method for each [REST API endpoint](https://docs.github.com/en/rest/reference/), for example `octokit.rest.repos.listForOrg()` for [`GET /orgs/{org}/repos`](https://docs.github.com/en/rest/reference/repos/#list-organization-repositories). The methods are generated in [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/). The [`src/generated/endpoints.ts` file](https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/master/src/generated/endpoints.ts) defines the **② endpoint default options** `method`, `url`, and in some cases `mediaType` and `headers`. +`@octokit/rest` exposes a method for each [REST API endpoint](https://docs.github.com/en/rest/reference/), for example `octokit.rest.repos.listForOrg()` for [`GET /orgs/{org}/repos`](https://docs.github.com/en/rest/reference/repos/#list-organization-repositories). The methods are generated in [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/). The [`src/generated/endpoints.ts` file](https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/main/src/generated/endpoints.ts) defines the **② endpoint default options** `method`, `url`, and in some cases `mediaType` and `headers`. -**② endpoint default options** are merged with **① global defaults**, which are based on [@octokit/endpoint/src/defaults.ts](https://github.com/octokit/endpoint.js/blob/master/src/defaults.ts) and the options that were passed into the `new Octokit(options)` constructor. +**② endpoint default options** are merged with **① global defaults**, which are based on [@octokit/endpoint/src/defaults.ts](https://github.com/octokit/endpoint.js/blob/main/src/defaults.ts) and the options that were passed into the `new Octokit(options)` constructor. Both are merged with **③ user options** passed into each method. Altogether they result in **④ endpoint options**. diff --git a/README.md b/README.md index 485bd235..3a46f370 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ > GitHub REST API client for JavaScript [![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) -[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amaster) +[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amain) ## Usage @@ -13,10 +13,10 @@ Browsers Load @octokit/rest directly from cdn.skypack.dev - + ```html ``` diff --git a/docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js b/docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js index cbc187b2..c804854f 100644 --- a/docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js +++ b/docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js @@ -15,7 +15,7 @@ function createEndpointsSource(version, branch) { module.exports = ({ currentVersion, versions }) => ({ plugins: [ // source remote endpoints data for the current version - createEndpointsSource(currentVersion, 'master'), + createEndpointsSource(currentVersion, 'main'), // map over the version config object and add git sources // for their docs from this repo and generated endpoint method docs ...versions.flatMap(({ name, branch, endpoints }) => [ diff --git a/package.json b/package.json index 03e65d65..2c3513da 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,15 @@ } }, "release": { + "branches": [ + "+([0-9]).x", + "main", + "next", + { + "name": "beta", + "prerelease": true + } + ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator",