Summary:
Updates all dependencies in `bots/`, which also removes a security vulnerability with `websocket-extensions@<0.1.4`.
Changelog:
[Internal]
Reviewed By: GijsWeterings
Differential Revision: D33960461
fbshipit-source-id: 2d32ceba5ab09dc1bed5d6edc26a5134042dd29f
Summary:
Danger 7 -> 11
## Changelog
[Internal] [Changed] - Updates Danger used in PR checking from v7 to v11
Pull Request resolved: https://github.com/facebook/react-native/pull/33027
Test Plan:
Works when testing locally
```
> DANGER_GITHUB_API_TOKEN=XXYYZZ yarn danger pr https://github.com/facebook/react-native/pull/32955
yarn run v1.22.15
$ node ./node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/32955
Starting Danger PR on facebook/react-native#32955
--- Accurate Error due to not being able to write to labels ---
## Failures
`node` failed.
## Messages
📋 Missing Summary - <i>Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.</i>
-
📋 Missing Test Plan - <i>Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.</i>
-
📋 Missing Changelog - <i>Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: `[CATEGORY] [TYPE] - Message`.
<details>CATEGORY may be:
- General
- iOS
- Android
- JavaScript
- Internal (for changes that do not need to be called out in the release notes)
TYPE may be:
- Added, for new features.
- Changed, for changes in existing functionality.
- Deprecated, for soon-to-be removed features.
- Removed, for now removed features.
- Fixed, for any bug fixes.
- Security, in case of vulnerabilities.
MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.</details></i>
## Markdowns
Danger: ⅹ Failing the build, there is 1 fail.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
Reviewed By: GijsWeterings
Differential Revision: D33941271
Pulled By: cortinico
fbshipit-source-id: 359c0076a160a8eeac897a2e1556d3e4d3db5e04
Summary:
As stated in [https://github.com/facebook/react-native/issues/28043](https://github.com/facebook/react-native/issues/28043) the requests with the `Octokit` lib is not optimal since tracking issues were raised. Since the issue could not be reproduced (see comments in the mentioned issue) I'm proposing to update the `Octokit` package to the newest version and add the required fields as stated [in the documentation](https://octokit.github.io/rest.js/v18#authentication).
## Changelog
[Internal] [Changed] - Changed requests of the internal code analysis
Pull Request resolved: https://github.com/facebook/react-native/pull/32891
Test Plan:
Ran the code analysis bot manually
```
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check-ios --silent --json; echo flow; npm run flow-check-android --silent --json; echo google-java-format; node scripts/lint-java.js --diff) | GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" node bots/code-analysis-bot.js
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
```
Reviewed By: christophpurrer
Differential Revision: D33793194
Pulled By: cortinico
fbshipit-source-id: 21b5f9f3911dd82e3254ab009637ab63aa36d30c
Summary:
Changelog: [Internal] Remove warning about creating a pull request to a release branch
We want to support this use case as we want pick requesters to land the cherry-picks themselves and rely on CircleCI automation to test
Reviewed By: cortinico
Differential Revision: D32780819
fbshipit-source-id: 882625a016653dbf480da33fd499d3718b2b5524
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32642
This Diff adapts the Dangerfile to be a bit more friendly
for PRs that are exported from Phabricator. Specifically,
I'm disabling the check for Test Plan as those are not exported
externally. The check for Summary and Changelog are instead adapted
to work with the format exported for Phabricator.
Changelog:
[Internal] [Changed] - Make Danger Phabricator-friendly
Reviewed By: yungsters
Differential Revision: D32594622
fbshipit-source-id: e31f29defdd926a267cecc9efa6d63de2e580f43
Summary:
Links under `reactnative.dev` that ended with `.html` lead to Page not found.
Fixed the url so that users get sent to the appropriate url.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Fixed] - Fixed dead links in the comments.
Pull Request resolved: https://github.com/facebook/react-native/pull/32619
Test Plan: - Changed links are accessible
Reviewed By: lunaleaps
Differential Revision: D32528978
Pulled By: cortinico
fbshipit-source-id: e039d18188371cf5240b37049e431329e28b1b8b
Summary:
CircleCI stopped populating `CIRCLE_PULL_REQUEST` without providing an
alternative, so now it's impossible to get the PR number unless it comes
from a forked repo.
## Changelog
[Internal] [Fixed] - ignore bundle size reporter failures
Pull Request resolved: https://github.com/facebook/react-native/pull/32490
Test Plan: CI should ignore bundle size reporter failures.
Reviewed By: fkgozali
Differential Revision: D32008694
Pulled By: lunaleaps
fbshipit-source-id: 68e25ac2fbb23c1d7a55e667c90aec3a61302b8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32418
This commit does 2 things:
* Process and store stats for *-stable branches, in addition to main
* Print out the new stats to stdout, so that CI jobs can display them for verification purpose
This also means a new field `branch` is used for the Firestore data.
Changelog: [Internal]
Reviewed By: hramos
Differential Revision: D31717251
fbshipit-source-id: 9dbfa8fb8f0243c013dcd822230400d26c09eaa4
Summary:
The size information is currently not used for release branches. Further, the CI step failed because there is no PR associated with commits in RC branch. This commit fixed that error by skipping the entire work altogether.
Sample error: https://app.circleci.com/pipelines/github/facebook/react-native/10161/workflows/3625732a-531f-435d-83b6-1dbc638e1bab/jobs/215405/parallel-runs/0/steps/0-125
In theory, we should be storing RC bundle sizes as well, but the current backing Firebase DB has not been configured with proper index:
```
Error [FirebaseError]: The query requires an index.
...
```
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D31705912
fbshipit-source-id: 26757174f7937cb23d8e55066b833ae15ec011e3
Summary: Changelog: [Internal] Configure circleCI to comment on PR after building tarball
Reviewed By: hramos
Differential Revision: D31387660
fbshipit-source-id: 28902148cf5e2ea15320333b90a6a7fa9d553c3b
Summary:
Updates CI and bot configurations to use `main` instead of `master`.
I will land this after I conver the repository to `main`.
Changelog:
[Internal]
Reviewed By: JoshuaGross
Differential Revision: D29717337
fbshipit-source-id: 9aa9711df921cd7d3d94fbc3d8bb9d6e22abf5c1
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
Summary:
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts.
Currently done
- Working on iOS
- Working on Android
- Detox Tests working on iOS
Need to work on
- Errors generated by the CI builds
[General] [Changed] - Migrated the RNTester App to the packages directory.
Pull Request resolved: https://github.com/facebook/react-native/pull/29567
Test Plan: It runs on both ios and android for now and the detox iOS builds are working.
Reviewed By: cpojer
Differential Revision: D23034761
Pulled By: rickhanlonii
fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
Summary:
Do not nag on PRs that contain internal changelogs (meaning, the change doesn't need to be called out in release notes).
## Changelog
[Internal] - This should be acceptable.
Pull Request resolved: https://github.com/facebook/react-native/pull/28486
Test Plan: See PR.
Reviewed By: cpojer
Differential Revision: D20817454
Pulled By: hramos
fbshipit-source-id: a7082c4db05ec53ad27349db7e5bce2cfffd6930
Summary:
This gets us on the latest Prettier 2.x:
https://prettier.io/blog/2020/03/21/2.0.0.html
Notably, this adds support for TypeScript 3.8,
which introduces new syntax, such as `import type`.
Reviewed By: zertosh
Differential Revision: D20636268
fbshipit-source-id: fca5833d003804333a05ba16325bbbe0e06d6c8a
Summary:
- Timestamp of entries in our Firebase instance sometimes get stored as number. This means that we may not always be diffing against the latest master commit.
- Size report of Android and iOS gets overwritten depending on which build finishes first.
## Changelog
[Internal] [Fixed] - App bundle size diff not always being compared against latest commit
[Internal] [Fixed] - Android and iOS app bundle size diff overwrite each other
Pull Request resolved: https://github.com/facebook/react-native/pull/28368
Test Plan:
- We are now using Firebase's own [firebase.firestore.Timestamp.now](https://firebase.google.com/docs/reference/js/firebase.firestore.Timestamp#now) to ensure that we always get a timestamp in the preferred format. This has been tested locally but can only be verified when merged to master and we start getting new data. In the meantime, I'll manually fix up all the entries in the store.
- There should be one app bundle size comment for Android and one for iOS in this PR.
Reviewed By: cpojer
Differential Revision: D20601620
Pulled By: hramos
fbshipit-source-id: 0c3e4b78a74cbd659f1957a6aa74322b016e0646
Summary:
Add diffing to app bundle size reports.
## Changelog
[Internal] [Changed] - Add diffing to app bundle size reports
Pull Request resolved: https://github.com/facebook/react-native/pull/28284
Test Plan:
- App bundle size reports should now display a diff where available
- Right now, the database contains only one entry for the last known good iOS build
- Triggering a new build should not create additional comments
Reviewed By: cpojer
Differential Revision: D20450158
Pulled By: hramos
fbshipit-source-id: 720772275f24d3ff0a49705f4dada2efe2e99bd3
Summary:
Make the Android app bundle size report more legible, and update existing reports if possible.
## Changelog
[Internal] [Changed] - Update existing app bundle size report if possible
[Internal] [Changed] - Generate table for APK sizes report
Pull Request resolved: https://github.com/facebook/react-native/pull/28169
Test Plan:
- App bundle size reports should be updated when possible
- Android apk sizes should be reported using a table
Reviewed By: cpojer
Differential Revision: D20141490
Pulled By: hramos
fbshipit-source-id: 3fc1b808b27e893c0a3e4e34eafc39094448799c
Summary:
We recently updated React Native's docs site to have its own domain reactnative.dev and needed to update the URLs in the source code
CHANGELOG:
[INTERNAL]
Reviewed By: hramos
Differential Revision: D20072842
fbshipit-source-id: 1970d9214c872a6e7abf697d99f8f5360b3b308e
Summary:
Addresses deprecation warnings from `octokit/rest`. This is a follow up to https://github.com/facebook/react-native/issues/28019.
## Changelog
[Internal] [Fixed] - Address deprecation warnings from `octokit/rest`
Pull Request resolved: https://github.com/facebook/react-native/pull/28050
Test Plan: PRs should still get app bundle sizes report, but the warnings in the build logs should be gone.
Reviewed By: cpojer
Differential Revision: D20008805
Pulled By: hramos
fbshipit-source-id: 891d14fd9d55f217194a095d2736494416dacda2
Summary:
This PR cleans up some of our GitHub bots. The overall goal is to make the contribution process just a tad nicer.
### analysis-bot
* The bot will continue leaving GitHub Reviews when it finds lint issues, but will abstain from leaving inline comments if they would exceed 5 in number.
* The review comment left by the bot has instructions on how to reproduce the lint issues locally. This will educate PR authors on how to run lint and fix the issues without unnecessarily spamming the PR with 50+ comments, while still providing useful reviews to authors when only a handful of lint issues slip by.
* Code moved to `bots/` directory for ease of discovery and co-location with pull-bot.
* Added `yarn lint-ci` command. This seems like the right choice: it's running `yarn lint` and other linters, and it is only intended to run on CI.
* It's still possible to run `yarn lint-ci` locally, though the script will stop short of posting a review to GitHub unless the necessary envvars are provided.
* Added `yarn shellcheck` command. This can be run locally, though it requires `shellcheck` to be installed.
* Outside of this PR, I added instructions on using shellcheck to https://github.com/facebook/react-native/wiki/Development-Dependencies
* Updated Circle CI config to use these new commands, and streamlined the `analyze_pr` step.
* Documented analysis-bot in `bots/README.md`.
### pull-bot
* Bumped `danger-js` dependency. No breaking changes found in this minor bump from what I can tell.
* Documented pull-bot in `bots/README.md`.
### misc
* PR template: don't use jargon.
## Changelog
[Internal] [Changed] - GitHub Bots cleanup
Pull Request resolved: https://github.com/facebook/react-native/pull/24923
Differential Revision: D15399744
Pulled By: hramos
fbshipit-source-id: 32632e775f8554424072270e3f98542de84bfb8c
Summary:
So far we have only officially supported "iOS" and "Android" as categories, with a "General" catch all for everything else.
Let's add a "JavaScript" category for changes that only affect JavaScript, and an "Internal" category for things that do not make sense in a changelog (e.g. CI changes).
[Internal] [Added] - Added JavaScript and Internal categories to changelog regex
Pull Request resolved: https://github.com/facebook/react-native/pull/24744
Differential Revision: D15258061
Pulled By: cpojer
fbshipit-source-id: 8b6cb193adf602d3bd6639b550e04775b201fe59
Summary:
See https://help.github.com/en/articles/adding-support-resources-to-your-project. The SUPPORT file is surfaced by GitHub in several useful places. The goal is to increase discoverability of all support resources, giving the reader an opportunity to find the help they need before they open an issue in the repository. A secondary goal is to use a friendlier tone when communicating our processes.
The issue templates have been standardized to follow the format used by GitHub's template tool. A bug in the "Regressions" template, due to its use of multiple labels, is fixed as well.
The bot will explain how a changelog can be fixed when it nags a PR.
[General][Added] - Added SUPPORT resources, friendlier messaging.
Pull Request resolved: https://github.com/facebook/react-native/pull/23778
Differential Revision: D14333911
Pulled By: hramos
fbshipit-source-id: d4b3e75194ea7d5c932dd8df2393d5b189f30f35
Summary:
Changed Danger's config so that it provides advice whenever it finds an issue with the pull request template, instead of posting a warning.
Updated Danger several major versions, from 2 to 7. I worked through any breaking changes, which were minimal (change `yarn danger` to `yarn danger ci`).
Added a flag to have Danger post these messages as GitHub Checks instead of as a comment. This slightly buries Danger's output, as it's no longer posted as a comment, but I believe it integrates more nicely into the GitHub interface.
[GENERAL] [Changed] - GitHub-only change: updated Danger config to be nicer to PRs
Pull Request resolved: https://github.com/facebook/react-native/pull/23334
Differential Revision: D14002313
Pulled By: cpojer
fbshipit-source-id: b97ca7b7bd164646b249b7c64b1134306e0f38a8
Summary:
The updated Dangerfile config lets pull-bot warn when the PR lacks a Summary, on top of the existing Test Plan and Changelog warnings.
It will also be a bit more lenient when it comes to the changelog, making the `-` optional after TYPE.
Finally, I removed the "large PR" warning. We haven't had a problem with large PRs recently, and I feel we can deal with these on a case by case basis.
[GENERAL] [Changed] Adjust pull-bot to handle new PR template.
Tested against this PR (note the non-standard section titles):
```
$ yarn
$ yarn danger pr https://github.com/facebook/react-native/pull/23236📋 Missing Summary - <i>Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.</i>
-
📋 Missing Test Plan - <i>Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.</i>
-
📋 Missing Changelog - <i>Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [`[CATEGORY] [TYPE] - Message`](http://facebook.github.io/react-native/docs/contributing#changelog).</i>
Found only warnings, not failing the build
✨ Done in 4.86s.
```
Pull Request resolved: https://github.com/facebook/react-native/pull/23236
Differential Revision: D13915716
Pulled By: cpojer
fbshipit-source-id: 6f1c3e67140c14359fc369b36b900aedf9a3bd8a
Summary:
In #22117 we changed the PR template to use `Changelog` instead of `Release notes` and now danger bot is complaining as it wasn't updated there.
cc turnrye
Pull Request resolved: https://github.com/facebook/react-native/pull/22395
Differential Revision: D13195006
Pulled By: TheSavior
fbshipit-source-id: 36b9675c1e30c86fb8d002b121cc29239d6f78dd
Summary:
In the new changelog format, we're following [Keep a Changelog](https://keepachangelog.com/en/1.0.0). This change updates the PR template to follow their change types, plus it simplifies the *CATEGORY* field to follow the changelog's groupings. Some simplified examples have been provided, though I plan to revisit this after 0.58 to add real-world examples. This change is motivated by react-native-community/react-native-releases#47.
Pull Request resolved: https://github.com/facebook/react-native/pull/22117
Differential Revision: D12919271
Pulled By: TheSavior
fbshipit-source-id: 91f063f769357b24383db281545678b924ad3efb
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.
I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062
Differential Revision: D12889447
Pulled By: TheSavior
fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary:
The eslint bot has not been working since the migration to Circle 2.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/20822
Differential Revision: D9492680
Pulled By: hramos
fbshipit-source-id: 7f2f9ac125b6cab1750902c485a6d27d6c3cf302
Summary:
GitHub notifications have been made noisier with these automatic mentions. We can rely on the automatic reviewer tags instead.
Also: suggest labels that may be used, based on release notes (the danger bot cannot add labels itself).
Closes https://github.com/facebook/react-native/pull/18138
Differential Revision: D7114654
Pulled By: hramos
fbshipit-source-id: 0d85879f937921543935d090c792ea09f53cb84a
Summary:
Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder.
Most changes are removing trailing spaces from comments.
Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied.
N/A
[INTERNAL][MINOR][] - Fix ESLint warnings
Closes https://github.com/facebook/react-native/pull/18047
Differential Revision: D7054948
Pulled By: hramos
fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
Summary:
No logic change here. Part of a plan to consolidate CI-only files amongst .circleci and bots/ directories.
Closes https://github.com/facebook/react-native/pull/17807
Differential Revision: D6865976
Pulled By: hramos
fbshipit-source-id: 48607a80dcf8cac1c3c033c18bf5d6dd4cd8e6bf