Skip to content

Commit

Permalink
RN: Replace master with main in Documentation
Browse files Browse the repository at this point in the history
Summary:
Updates documentation in React Native to reference `main` (or `HEAD` for URLs) instead of `master`.

Part of #31788.

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

Reviewed By: JoshuaGross

Differential Revision: D29717128

fbshipit-source-id: 0b0babd8407c6fd3d0e5431f6eaf976059731d6f
  • Loading branch information
yungsters authored and facebook-github-bot committed Jul 15, 2021
1 parent ff9c8cd commit c7cbf02
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -64,19 +64,19 @@ 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

Code-level contributions to React Native generally come in the form of [pull requests](https://help.github.com/en/articles/about-pull-requests). These are done by forking the repo and making changes locally. Directly in the repo, there is the [`rn-tester` app](/packages/rn-tester) that you can install on your device (or simulators) and use to test the changes you're making to React Native sources.

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/).
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions IntegrationTests/ImageCachePolicyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}}
Expand All @@ -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',
}}
Expand All @@ -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',
}}
Expand All @@ -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',
}}
Expand Down
2 changes: 1 addition & 1 deletion Libraries/BugReporting/getReactData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Interaction/PanResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {|
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=1000.0.0-main
GROUP=com.facebook.react

POM_NAME=ReactNative
Expand Down
10 changes: 5 additions & 5 deletions Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion bots/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-native-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "[email protected]: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",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-native-community/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]:facebook/react-native.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]:facebook/react-native.git",
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-manual-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit c7cbf02

Please sign in to comment.