RN: Replace master with main in Documentation

Summary:
Updates documentation in React Native to reference `main` (or `HEAD` for URLs) instead of `master`.

Part of https://github.com/facebook/react-native/issues/31788.

Changelog:
[General][Changed] - Update documentation reference from `master` to `main` or `HEAD`.

Reviewed By: JoshuaGross

Differential Revision: D29717128

fbshipit-source-id: 0b0babd8407c6fd3d0e5431f6eaf976059731d6f
This commit is contained in:
Tim Yung 2021-07-15 12:22:38 -07:00 committed by Facebook GitHub Bot
parent ff9c8cdac9
commit 92c13f0d1d
15 changed files with 31 additions and 31 deletions

View File

@ -8,9 +8,9 @@ The [Open Source Guides](https://opensource.guide/) website has a collection of
* [Building Welcoming Communities](https://opensource.guide/building-community/)
### [Code of Conduct](https://github.com/facebook/react/blob/master/CODE_OF_CONDUCT.md)
### [Code of Conduct](https://github.com/facebook/react-native/blob/HEAD/CODE_OF_CONDUCT.md)
As a reminder, all contributors are expected to adhere to the [Code of Conduct](https://github.com/facebook/react/blob/master/CODE_OF_CONDUCT.md).
As a reminder, all contributors are expected to adhere to the [Code of Conduct](https://github.com/facebook/react-native/blob/HEAD/CODE_OF_CONDUCT.md).
## Ways to Contribute
@ -64,11 +64,11 @@ If you are adding new functionality or introducing a change in behavior, we will
### Contributing to the Blog
The React Native blog is generated [from the Markdown sources for the blog](https://github.com/facebook/react-native-website/tree/master/website/blog).
The React Native blog is generated [from the Markdown sources for the blog](https://github.com/facebook/react-native-website/tree/HEAD/website/blog).
Please open an issue in the https://github.com/facebook/react-native-website repository or tag us on [@ReactNative on Twitter](http://twitter.com/reactnative) and get the go-ahead from a maintainer before writing an article intended for the React Native blog. In most cases, you might want to share your article on your own blog or writing medium instead. It's worth asking, though, in case we find your article is a good fit for the blog.
We recommend referring to the [CONTRIBUTING](https://github.com/facebook/react-native-website/blob/master/CONTRIBUTING.md) document for the `react-native-website` repository to learn more about contributing to the website in general.
We recommend referring to the [CONTRIBUTING](https://github.com/facebook/react-native-website/blob/HEAD/CONTRIBUTING.md) document for the `react-native-website` repository to learn more about contributing to the website in general.
## Contributing Code
@ -76,7 +76,7 @@ Code-level contributions to React Native generally come in the form of [pull req
The process of proposing a change to React Native can be summarized as follows:
1. Fork the React Native repository and create your branch from `master`.
1. Fork the React Native repository and create your branch from `main`.
2. Make the desired changes to React Native sources. Use the `packages/rn-tester` app to test them out.
3. If you've added code that should be tested, add tests.
4. If you've changed APIs, update the documentation, which lives in [another repo](https://github.com/facebook/react-native-website/).
@ -97,7 +97,7 @@ Whenever you are ready to contribute code, check out our [step-by-step guide to
### Tests
Tests help us prevent regressions from being introduced to the codebase. The GitHub repository is continuously tested using Circle and Appveyor, the results of which are available through the Checks functionality on [commits](https://github.com/facebook/react-native/commits/master) and pull requests. You can learn more about running and writing tests in the [Tests wiki](http://github.com/facebook/react-native/wiki/Tests).
Tests help us prevent regressions from being introduced to the codebase. The GitHub repository is continuously tested using Circle and Appveyor, the results of which are available through the Checks functionality on [commits](https://github.com/facebook/react-native/commits/HEAD) and pull requests. You can learn more about running and writing tests in the [Tests wiki](http://github.com/facebook/react-native/wiki/Tests).
## Community Contributions

View File

@ -64,7 +64,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Image
source={{
uri:
'https://raw.githubusercontent.com/facebook/react-native/master/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
'https://raw.githubusercontent.com/facebook/react-native/HEAD/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
Date.now(),
cache: 'only-if-cached',
}}
@ -75,7 +75,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Image
source={{
uri:
'https://raw.githubusercontent.com/facebook/react-native/master/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
'https://raw.githubusercontent.com/facebook/react-native/HEAD/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
Date.now(),
cache: 'default',
}}
@ -86,7 +86,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Image
source={{
uri:
'https://raw.githubusercontent.com/facebook/react-native/master/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
'https://raw.githubusercontent.com/facebook/react-native/HEAD/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
Date.now(),
cache: 'reload',
}}
@ -97,7 +97,7 @@ class ImageCachePolicyTest extends React.Component<Props, $FlowFixMeState> {
<Image
source={{
uri:
'https://raw.githubusercontent.com/facebook/react-native/master/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
'https://raw.githubusercontent.com/facebook/react-native/HEAD/Libraries/NewAppScreen/components/logo.png?cacheBust=notinCache' +
Date.now(),
cache: 'force-cache',
}}

View File

@ -14,7 +14,7 @@
* Convert a react internal instance to a sanitized data object.
*
* This is shamelessly stolen from react-devtools:
* https://github.com/facebook/react-devtools/blob/master/backend/getData.js
* https://github.com/facebook/react-devtools/blob/HEAD/backend/getData.js
*/
function getData(element: Object): Object {
let children = null;

View File

@ -159,7 +159,7 @@ type ButtonProps = $ReadOnly<{|
[button:examples].
[button:source]:
https://github.com/facebook/react-native/blob/master/Libraries/Components/Button.js
https://github.com/facebook/react-native/blob/HEAD/Libraries/Components/Button.js
[button:examples]:
https://js.coach/?menu%5Bcollections%5D=React%20Native&page=1&query=button

View File

@ -121,7 +121,7 @@ const currentCentroidY = TouchHistoryMath.currentCentroidY;
* ### Working Example
*
* To see it in action, try the
* [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/master/packages/rn-tester/js/examples/PanResponder/PanResponderExample.js)
* [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/HEAD/packages/rn-tester/js/examples/PanResponder/PanResponderExample.js)
*/
export type GestureState = {|

View File

@ -10,7 +10,7 @@
</p>
<p align="center">
<a href="https://github.com/facebook/react-native/blob/master/LICENSE">
<a href="https://github.com/facebook/react-native/blob/HEAD/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="React Native is released under the MIT license." />
</a>
<a href="https://circleci.com/gh/facebook/react-native">
@ -38,7 +38,7 @@
<span> · </span>
<a href="https://reactnative.dev/help">Community</a>
<span> · </span>
<a href="https://github.com/facebook/react-native/blob/master/.github/SUPPORT.md">Support</a>
<a href="https://github.com/facebook/react-native/blob/HEAD/.github/SUPPORT.md">Support</a>
</h3>
React Native brings [**React**'s][r] declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.
@ -52,7 +52,7 @@ React Native is developed and supported by many companies and individual core co
[r]: https://reactjs.org/
[p]: https://reactnative.dev/docs/out-of-tree-platforms
[e]: https://github.com/facebook/react-native/blob/master/ECOSYSTEM.md
[e]: https://github.com/facebook/react-native/blob/HEAD/ECOSYSTEM.md
## Contents
@ -143,5 +143,5 @@ React Native is MIT licensed, as found in the [LICENSE][l] file.
React Native documentation is Creative Commons licensed, as found in the [LICENSE-docs][ld] file.
[l]: https://github.com/facebook/react-native/blob/master/LICENSE
[ld]: https://github.com/facebook/react-native/blob/master/LICENSE-docs
[l]: https://github.com/facebook/react-native/blob/HEAD/LICENSE
[ld]: https://github.com/facebook/react-native/blob/HEAD/LICENSE-docs

View File

@ -565,7 +565,7 @@ afterEvaluate {
licenses {
license {
name = "MIT License"
url = "https://github.com/facebook/react-native/blob/master/LICENSE"
url = "https://github.com/facebook/react-native/blob/HEAD/LICENSE"
distribution = "repo"
}
}

View File

@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=1000.0.0-main
GROUP=com.facebook.react
POM_NAME=ReactNative

View File

@ -4,7 +4,7 @@ This document serves as guide for release coordinators. You can find a list of r
## Release schedule
React Native follows a monthly release train. Every month, a new branch created off master enters the Release Candidate phase, and the previous Release Candidate branch is released and considered stable.
React Native follows a monthly release train. Every month, a new branch created off `main` enters the Release Candidate phase, and the previous Release Candidate branch is released and considered stable.
| Version | RC release | Stable release |
@ -28,7 +28,7 @@ React Native follows a monthly release train. Every month, a new branch created
The following are required for the local test suite to run:
- macOS with [Android dev environment set up](https://github.com/facebook/react-native/blob/master/ReactAndroid/README.md)
- macOS with [Android dev environment set up](https://github.com/facebook/react-native/blob/HEAD/ReactAndroid/README.md)
- [react-native-cli](https://www.npmjs.com/package/react-native-cli) installed globally (v0.2.0 or newer)
### Step 1: Check everything works
@ -90,13 +90,13 @@ Once everything is ready, create a new release at https://github.com/facebook/re
### Step 4: Update `Breaking Changes` document
Once the release is cut, go to the [page](https://github.com/facebook/react-native/wiki/Breaking-Changes) where all breaking changes are listed and create section for the release. Don't forget to move all breaking changes from `master` that are now part of the release.
Once the release is cut, go to the [page](https://github.com/facebook/react-native/wiki/Breaking-Changes) where all breaking changes are listed and create section for the release. Don't forget to move all breaking changes from `main` that are now part of the release.
When finished and there are breaking changes, include them in the release notes you just created.
### Step 5: Tweet about the RC release
Tweet about it! Link to release notes and say "please report issues" and link to the master issue to track bugs you created.
Tweet about it! Link to release notes and say "please report issues" and link to the main issue to track bugs you created.
### Step 6: IMPORTANT: Track bug reports from the community during the following month, ping owners to get them fixed
@ -106,7 +106,7 @@ Now that the release is out in the open, go ahead and create a GitHub issue titl
## How to release an RC update (e.g. 0.57.0-rc.1, 0.57.0-rc.2)
The release is now in the open, people are finding bugs, and fixes have landed in master. People have been nominating fixes in the issue you created above. Use your best judgment to decide which commits merit an RC update. It's a good idea to do a new RC release when several small and non-risky bugs have been fixed. Having a few RC releases can also help people bisect in case we cherry-pick a bad commit by mistake.
The release is now in the open, people are finding bugs, and fixes have landed in `main`. People have been nominating fixes in the issue you created above. Use your best judgment to decide which commits merit an RC update. It's a good idea to do a new RC release when several small and non-risky bugs have been fixed. Having a few RC releases can also help people bisect in case we cherry-pick a bad commit by mistake.
**Only cherry-pick small and non-risky bug fixes**. **Don't pick new features into the release** as this greatly increases the risk of something breaking. The main point of the RC is to let people to use it for a month and fix the most serious bugs.

View File

@ -85,7 +85,7 @@ const isMergeRefStable = danger.github.pr.base.ref.indexOf('-stable') !== -1;
if (!isMergeRefMaster && isMergeRefStable) {
const title = ':grey_question: Base Branch';
const idea =
'The base branch for this PR is something other than `master`. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on `master` first and then cherry-pick the commits into the branch for that release. The [Releases Guide](https://github.com/facebook/react-native/blob/master/Releases.md) has more information.';
'The base branch for this PR is something other than `master`. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on `master` first and then cherry-pick the commits into the branch for that release. The [Releases Guide](https://github.com/facebook/react-native/blob/HEAD/Releases.md) has more information.';
warn(`${title} - <i>${idea}</i>`);
} else if (!isMergeRefMaster && !isMergeRefStable) {
const title = ':exclamation: Base Branch';

View File

@ -9,7 +9,7 @@
"url": "git@github.com:facebook/react-native.git",
"directory": "packages/eslint-config-react-native-community"
},
"homepage": "https://github.com/facebook/react-native/tree/master/packages/eslint-config-react-native-community#readme",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community#readme",
"dependencies": {
"@react-native-community/eslint-plugin": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^4.22.1",

View File

@ -1,6 +1,6 @@
# eslint-plugin-react-native-community
This plugin is intended to be used in [`@react-native-community/eslint-config`](https://github.com/facebook/react-native/tree/master/packages/eslint-config-react-native-community). You probably want to install that package instead.
This plugin is intended to be used in [`@react-native-community/eslint-config`](https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community). You probably want to install that package instead.
## Installation

View File

@ -2,7 +2,7 @@
"name": "react-native-codegen",
"version": "0.0.7",
"description": "⚛️ Code generation tools for React Native",
"homepage": "https://github.com/facebook/react-native/tree/master/packages/react-native-codegen",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen",
"repository": {
"type": "git",
"url": "git@github.com:facebook/react-native.git",

View File

@ -3,7 +3,7 @@
"version": "0.0.1",
"license": "MIT",
"description": "React Native tester app.",
"homepage": "https://github.com/facebook/react-native/tree/master/packages/rn-tester",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/rn-tester",
"repository": {
"type": "git",
"url": "git@github.com:facebook/react-native.git",

View File

@ -121,4 +121,4 @@ open "/tmp/${project_name}/ios/${project_name}.xcworkspace"
cd "$repo_root"
info "Next steps:"
info " - https://github.com/facebook/react-native/blob/master/Releases.md"
info " - https://github.com/facebook/react-native/blob/HEAD/Releases.md"