Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default branch rename #253

Merged
merged 2 commits into from Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/pull_request_template.md
Expand Up @@ -11,18 +11,18 @@ Resolves #ISSUE_NUMBER
### Before the change?
<!-- Please describe the current behavior that you are modifying. -->

*
*

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

*
*


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

*
*

----

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

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 do not submit updates to dependencies unless it fixes an issue. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
<!-- Please do not submit updates to dependencies unless it fixes an issue. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->

Please add the corresponding label for change this PR introduces:
- Bugfix: `Type: Bug`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
@@ -1,7 +1,7 @@
"on":
push:
branches:
- master
- main
- next
- beta
- "*.x"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -2,7 +2,7 @@ name: Test
"on":
push:
branches:
- master
- main
- next
- beta
- dependabot/npm_and_yarn/**
Expand Down
4 changes: 2 additions & 2 deletions .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
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions HOW_IT_WORKS.md
Expand Up @@ -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**.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -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

Expand All @@ -13,10 +13,10 @@
Browsers
</th><td width=100%>
Load <code>@octokit/rest</code> directly from <a href="https://cdn.skypack.dev">cdn.skypack.dev</a>

```html
<script type="module">
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
import { Octokit } from "https://cdn.skypack.dev/@octokit/rest";
</script>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/gatsby-plugin-versioned-docs/gatsby-config.js
Expand Up @@ -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 }) => [
Expand Down
9 changes: 9 additions & 0 deletions package.json
Expand Up @@ -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",
Expand Down