Skip to content

Commit e22cea8

Browse files
authored
Default branch rename (#253)
* Default branch rename * Add package.json main branch release config
1 parent aa53e3e commit e22cea8

File tree

9 files changed

+28
-19
lines changed

9 files changed

+28
-19
lines changed

.github/pull_request_template.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ Resolves #ISSUE_NUMBER
1111
### Before the change?
1212
<!-- Please describe the current behavior that you are modifying. -->
1313

14-
*
14+
*
1515

1616
### After the change?
1717
<!-- Please describe the behavior or changes that are being added by this PR. -->
1818

19-
*
19+
*
2020

2121

2222
### Other information
2323
<!-- Any other information that is important to this PR -->
2424

25-
*
25+
*
2626

2727
----
2828

@@ -36,20 +36,20 @@ Resolves #ISSUE_NUMBER
3636
### Does this introduce a breaking change?
3737
<!-- If this introduces a breaking change make sure to note it here any what the impact might be -->
3838

39-
Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/master/community/breaking_changes.md) to help!
39+
Please see our docs on [breaking changes](https://github.com/octokit/.github/blob/main/community/breaking_changes.md) to help!
4040

4141
- [ ] Yes (Please add the `Type: Breaking change` label)
4242
- [ ] No
4343

44-
If `Yes`, what's the impact:
44+
If `Yes`, what's the impact:
4545

4646
* N/A
4747

4848

4949
### Pull request type
5050

51-
<!-- Please do not submit updates to dependencies unless it fixes an issue. -->
52-
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
51+
<!-- Please do not submit updates to dependencies unless it fixes an issue. -->
52+
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
5353

5454
Please add the corresponding label for change this PR introduces:
5555
- Bugfix: `Type: Bug`

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"on":
22
push:
33
branches:
4-
- master
4+
- main
55
- next
66
- beta
77
- "*.x"

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test
22
"on":
33
push:
44
branches:
5-
- master
5+
- main
66
- next
77
- beta
88
- dependabot/npm_and_yarn/**

.github/workflows/update-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Update docs on pushes to master
1+
name: Update docs on pushes to main
22
"on":
33
push:
44
branches:
5-
- master
5+
- main
66
jobs:
77
update_docs:
88
runs-on: ubuntu-latest

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ variable (or set it in a `.env` file) to avoid running against GitHub's rate lim
4848

4949
Here is an overview of [how `@octokit/rest` works](HOW_IT_WORKS.md).
5050

51-
- Create a topic branch from the master branch.
51+
- Create a topic branch from the main branch.
5252
- Check for unnecessary whitespace / changes with `git diff --check` before committing.
5353
- Keep git commit messages clear and appropriate. Ideally follow commit conventions described below.
5454

5555
## Submitting the Pull Request
5656

5757
- Push your changes to your topic branch on your fork of the repo.
58-
- Submit a pull request from your topic branch to the master branch on the `rest.js` repository.
58+
- Submit a pull request from your topic branch to the main branch on the `rest.js` repository.
5959
- 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.
6060

6161
## Testing a pull request from github repo locally:

HOW_IT_WORKS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
## Endpoint options (① - ④)
1717

18-
`@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`.
18+
`@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`.
1919

20-
**② 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.
20+
**② 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.
2121

2222
Both are merged with **③ user options** passed into each method. Altogether they result in **④ endpoint options**.
2323

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> GitHub REST API client for JavaScript
44
55
[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest)
6-
[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amaster)
6+
[![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg)](https://github.com/octokit/rest.js/actions?query=workflow%3ATest+branch%3Amain)
77

88
## Usage
99

@@ -13,10 +13,10 @@
1313
Browsers
1414
</th><td width=100%>
1515
Load <code>@octokit/rest</code> directly from <a href="https://cdn.skypack.dev">cdn.skypack.dev</a>
16-
16+
1717
```html
1818
<script type="module">
19-
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
19+
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
2020
</script>
2121
```
2222

docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function createEndpointsSource(version, branch) {
1515
module.exports = ({ currentVersion, versions }) => ({
1616
plugins: [
1717
// source remote endpoints data for the current version
18-
createEndpointsSource(currentVersion, 'master'),
18+
createEndpointsSource(currentVersion, 'main'),
1919
// map over the version config object and add git sources
2020
// for their docs from this repo and generated endpoint method docs
2121
...versions.flatMap(({ name, branch, endpoints }) => [

package.json

+9
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@
9797
}
9898
},
9999
"release": {
100+
"branches": [
101+
"+([0-9]).x",
102+
"main",
103+
"next",
104+
{
105+
"name": "beta",
106+
"prerelease": true
107+
}
108+
],
100109
"plugins": [
101110
"@semantic-release/commit-analyzer",
102111
"@semantic-release/release-notes-generator",

0 commit comments

Comments
 (0)