65 Commits

Author SHA1 Message Date
Emily Brown
1ee6fdc571 Add branch targeting check to analyze-pr workflow (#55383)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55383

Adds a branch targeting validation that replaces the equivalent Danger.js check.
  The check validates that PRs target either `main` or a `-stable` branch, and
  automatically adds the "Pick Request" label when targeting stable branches.

  - Created `checkBranchTarget.js` - pure function returning validation message
  - Added check step to `annotate-pr.yml` that calls the JS and adds labels
  - Added `issues: write` permission for label functionality

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D91685081

fbshipit-source-id: 87e7124f7d825b51cb791dc94720c487ff95d414
2026-02-06 08:14:53 -08:00
Emily Brown
5e41043fb5 Add PR body validation to analyze-pr workflow (#55382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55382

This adds a `validatePRBody.js` script that checks pull request descriptions for required sections as part of a new `analyze-pr.yml` workflow that will replace part of the Danger-pr workflow.

The validation includes:
- **Description length check**: Fails if the PR body is missing or less than 50 characters
- **Summary section check**: Warns if the PR lacks a "## Summary" section
- **Test plan check**: Warns if the PR lacks a "## Test Plan" section
- **Changelog validation**: failing if missing or invalid

Key behaviors:
- Phabricator-sourced PRs (detected via "Differential Revision:" in body) skip summary, test plan, and changelog validation since these are enforced differently
- Validation messages use GitHub's `[!WARNING]` and `[!CAUTION]` callout syntax for clear visual feedback
- The workflow fails (via `core.setFailed`) when any required check fails
- Messages are passed to `postPRComment` alongside API changes for consolidated PR comments

This aims to mimic relevant parts of dangerfile.js

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D91158803

fbshipit-source-id: 2304251d18f9fc8bf9a29e536fff2d979573bd86
2026-02-06 08:14:53 -08:00
Alex Hunt
ce0658155b Delete outdated check_license script (#55425)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55425

See blame — this script lints for a `"PATENTS"` string inside any Git changes, which should not occur any more.

> D7119356 (8 years ago)
>
> [react-native][PR] Check PATENTS does not creep into files
>
> Summary:
> Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D92417808

fbshipit-source-id: 36e3507f835fe5df99644eb1a47cdc60fa68f88c
2026-02-05 11:06:06 -08:00
Alex Hunt
19305299bd Delete unused code-analysis script (#55421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55421

Deletes the largely unused `analyze_code`/`code-analysis-bot` script, which was part of our earlier CircleCI infra.

**Motivation**

- **Security**: Removes another use of a `GITHUB_TOKEN` env var being loaded into a script in our CI (similar to S603729).
- **Cleanup**: This script attempted to read various lint job results (including google-java-format, which is no longer present), and post a GitHub PR comment for >5 issues. In a GitHub Actions world, we don't really need this functionality.

**Other changes**

- The `yarn shellcheck` run from this script was load bearing, and is moved directly into the `lint` action.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D92407627

fbshipit-source-id: ef5664a273ad4aac721dbb53de73f2b96b47d75b
2026-02-05 10:02:20 -08:00
Pierre Moulon
6587beab88 Fixing typos (#55047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55047

Changelog: [Internal]

Fixed typos found through comprehensive recursive scan of the react-native-github directory.

**Fixed typos:**
1. "accomodate" → "accommodate" in CHANGELOG-0.6x.md
2. "occured" → "occurred" in LaunchUtils.js
3. "compatability" → "compatibility" in 7 Renderer files
4. "recieved" → "received" in PointerEvent test files (6 instances)
5. "seperated" → "separated" in ImageExample.js

**Total: 16 typo instances fixed across 10 files**

All typos were found by scanning ~3000 text files (excluding dist/third-party/node_modules) using pattern matching for common misspellings.

Reviewed By: javache

Differential Revision: D89799362

fbshipit-source-id: 73e9123dc0bae3c1ce8e374f4752404ab7345347
2026-01-06 03:23:09 -08:00
Simek
f36fd461e4 do not spellcheck vendored scripts (#55020)
Summary:
While running `yarn spellcheck` I have spotted that scripts located in `/vendor` directory are checked, which lead to a lot of warnings in the output.

This PR adds an exclusion for the `/vendor` path in the spellcheck script which leads to way smaller warnings set and saves ~10s of runtime on my machine.

## Changelog:

[INTERNAL] [FIXED] - Add `/vendor` to excluded paths for spellcheck script.

Pull Request resolved: https://github.com/facebook/react-native/pull/55020

Test Plan: Running `yarn spellcheck` locally.

Reviewed By: cipolleschi

Differential Revision: D90104078

Pulled By: cortinico

fbshipit-source-id: 9c16a71616a13db1c217b917a498ff8f6a462799
2026-01-05 02:57:27 -08:00
Jakub Piasecki
630f80c143 Setup basic Hermes V1 E2E tests (#54576)
Summary:
Adds a new action that will run every day after the nightly build is published. This action will set up a blank app from the template, enable Hermes V1, and run a simple E2E test on Android and iOS in both Debug and Release configurations.

## Changelog:

[INTERNAL] [ADDED] - Added basic E2E tests for Hermes V1

Pull Request resolved: https://github.com/facebook/react-native/pull/54576

Test Plan: I haven't tested the changes since they require larger action runners, but the changes are additive and don't impact existing infra (besides adding an optional parameter).

Reviewed By: cortinico

Differential Revision: D87331639

Pulled By: j-piasecki

fbshipit-source-id: 8d26cb7df66f2588b49f86f01ff0b623501e7f2b
2025-11-18 11:43:11 -08:00
Riccardo Cipolleschi
da5f15a25b Update draft release creation with Hermes V1 (#54313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54313

This change updates the draft release workflow to add dSYMS for Hermes V1 and also updating the url from where the dSYMs can be downloaded.

## Changelog:
[Internal] -

Reviewed By: j-piasecki

Differential Revision: D85758123

fbshipit-source-id: 7d771266de5b3829e9a39c649b610aaf79aa6206
2025-10-29 11:15:18 -07:00
Riccardo Cipolleschi
b5321041a1 Bump Machines to macos-15 (#54280)
Summary:
GH asked us to bump the machines from macos-14 to macos-15

## Changelog:
[Internal] -

Pull Request resolved: https://github.com/facebook/react-native/pull/54280

Test Plan: GHA

Reviewed By: javache

Differential Revision: D85570467

Pulled By: cipolleschi

fbshipit-source-id: 659b9c538a883b7bca1c6aeb2d1a7dceb6a22663
2025-10-27 15:41:36 -07:00
Moti Zilberman
1f57ae5249 Distribute React Native DevTools binaries via GitHub Releases (#52930)
Summary:
bypass-github-export-checks

OSS release infrastructure for the (experimental) React Native DevTools standalone shell.

Currently, binaries are built continuously on Meta infra and served from the Meta CDN using fbcdn.net URLs checked into a DotSlash file in the repo, e.g.:

15373218ec/packages/debugger-shell/bin/react-native-devtools (L9-L18)

For open source releases we want to primarily distribute the binaries as GitHub release assets, while keeping the Meta CDN URLs as a secondary option. This PR makes the necessary changes to the release workflows to support this:

* `workflows/create-release.yml` (modified): As part of the release commit, rewrite the DotSlash file to include the release asset URLs.
  * **NOTE:** After this commit, **the new URLs don't work yet**, because they refer to a release that hasn't been published. Despite this, the DotSlash file remains valid and usable (because DotSlash will happily fall back to the Meta CDN URLs, which are still in the file).
* `workflows/create-draft-release.yml` (modified): After creating a draft release, fetch the binaries from the Meta CDN and reupload them to GitHub as release assets. This is based on the contents of the DotSlash file rewritten by `create-release.yml`.
* `workflows/validate-dotslash-artifacts.yml` (new): After the release is published, all URLs referenced by the DotSlash (both Meta CDN URL and GH release asset URLs) should be valid and refer to the same artifacts. This workflow checks that this is the case.
  * If this workflow fails on a published release, the release may need to be burned or a hotfix release may be necessary - as the release will stop working correctly once the Meta CDN stops serving the assets.
  * This workflow will also be running continuously on `main`. If it fails on a commit in `main`, there might be a connectivity issue between the GHA runner and the Meta CDN, or there might be an issue on the Meta side.

NOTE: These changes to the release pipeline are generic and reusable; if we later add another DotSlash-based tool whose binaries need to be mirrored as GitHub release assets, we just need to add it to the `FIRST_PARTY_DOTSLASH_FILES` array.

## Changelog:

[Internal] Mirror React Native DevTools binaries in GitHub Releases

Pull Request resolved: https://github.com/facebook/react-native/pull/52930

Test Plan:
### Step 0: Unit tests

I've added unit tests for `dotslash-utils`, `curl-utils`, and for the majority of the logic that makes up the new release scripts (`write-dotslash-release-assets-urls`, `upload-release-assets-for-dotslash`, `validate-dotslash-artifacts`).

### Step 1: Test release commit

Created a test branch and draft PR: https://github.com/facebook/react-native/pull/53147.

Locally created a release commit, simulating the create-release GH workflow:

```
node scripts/releases/create-release-commit.js --reactNativeVersion 0.82.0-20250903-0830 --no-dry-run
```

This updated the DotSlash file in the branch: 2deeb7e703 (diff-205a9ff6005e30be061eaa64b9cb50b15b0e909dd188e0866189e952655a3483)

NOTE: I've also ensured that the `create-release-commit` script correctly updates the DotSlash file when running from a branch that already has a release commit - see screenshot:
<img width="1483" height="587" alt="image" src="https://github.com/user-attachments/assets/1ffd859b-e02b-483d-8067-9cc9116829a4" />

### Step 2: Test draft release

Enabled testing the create-draft-release GH workflow in the test branch using these temporary hacks:

* 81f334eac5
* 6d88516576
* 1428a8da8b

Workflow run: https://github.com/facebook/react-native/actions/runs/17426711373/job/49475327346
Draft release: https://github.com/facebook/react-native/releases/tag/untagged-c6a62a58e5baa37936e1
Draft release screenshot for posterity (since we'll likely delete the draft release after landing this):

<img width="1024" height="814" alt="image" src="https://github.com/user-attachments/assets/1900da15-48f6-4274-b29c-0ac2019d92c0" />

### Step 3: Test post-release validation script

For obvious reasons, I've avoided actually publishing the above draft release. But I have run the `validate-dotslash-artifacts` workflow on the *current* branch to ensure that the logic is correct: https://github.com/motiz88/react-native/actions/runs/17426885205/job/49475888486

Running `node scripts/releases/validate-dotslash-artifacts.js` in the release branch (without publishing the release first) fails, as expected:

<img width="1105" height="748" alt="image" src="https://github.com/user-attachments/assets/ed23a2e2-7a31-42eb-a324-f1d50eafe2fb" />

## Next steps

This PR is all the infra needed ahead of the 0.82 ~~branch cut~~ infra freeze to support the React Native DevTools standalone shell, at least on the GitHub side. ~~Some minor infra work remains on the Meta side, plus some product/logic changes to the React Native DevTools standalone shell that I'm intending to finish in time for 0.82 (for an experimental rollout).~~ EDIT: All the planned work has landed; the feature is code-complete on `main` as well as in `0.82-stable` (apart from this infra change).

As a one-off, once we've actually published 0.82.0-rc.1, we'll want to have a human look at the published artifacts and CI workflow logs to ensure everything is in order. (I'll make sure to communicate this to the 0.82 release crew.) Afterwards, the automation added in this PR should be sufficient.

Reviewed By: huntie

Differential Revision: D81578704

Pulled By: motiz88

fbshipit-source-id: 6a4a48c3713221a89dd5fc88851674c1ddc6bb10
2025-09-04 11:25:39 -07:00
Riccardo Cipolleschi
47a9a2b44f Fix recording for Maestro E2E tests on iOS (#53333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53333

As per title, the recordings of iOS E2E tests are broken because we are creating a file that contains the js engine in the name, but we are trying to store a file without the js engine in the name.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D80454067

fbshipit-source-id: e4eee86793eb36f9ec9643cba7b65de75e30cbe7
2025-08-18 08:18:03 -07:00
Nicola Corti
0ac41fa386 Further nightlies cleanup (#53302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53302

Those files can also go as they've been moved to
https://github.com/react-native-community/nightly-tests

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80342950

fbshipit-source-id: 0b5cc8f424eefa00c48377fe2fbc2cca5e7ef48d
2025-08-15 08:19:32 -07:00
Nicola Corti
f502cae9b5 Move all the infrastructure to test nightlies out of facebook/react-native (#53280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53280

I've moved a lot of the nightly testing infrastructure on a RNC repo here:
https://github.com/react-native-community/nightly-tests/

This allows us to iterate faster without having to wait for diffs to be
imported and test inside fbsource.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80262856

fbshipit-source-id: dc2dfe75901ac78ec9f6e940540102276d34acdf
2025-08-14 09:41:52 -07:00
Nicola Corti
ec9f62865c Update firebase DB url. (#53166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53166

Our DB doesn't have that suffix, so I'm removing it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79883740

fbshipit-source-id: a52ab275129807cbb6e066baefccd71a8ac7398d
2025-08-08 08:05:54 -07:00
Nicola Corti
cd71c9620c Do not die on collect-results after printing to Discord. (#53132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53132

This will prevent the Firebase script from running at all. I'm removing it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79801691

fbshipit-source-id: 2705dff93fc9dbbcfaf97a1ba29b69d4d0a8143c
2025-08-07 07:07:10 -07:00
Nicola Corti
00175bd096 Compare nightly results up to 7 days in the back (#53065)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53065

Instead of checking results from the previous day, allow to go back up to 7
days in the past to check for previous runs.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79568067

fbshipit-source-id: 5d6fac6a06b4e26e52de6fbf6187ec8f8e44e10e
2025-08-06 03:04:02 -07:00
Nicola Corti
f806851875 Store nightly outcome and compute daily broken/recovered from Firebase (#53066)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53066

This diff introduces the mechanism for us to store the result of nightly 3p
library integration on Firebase.
Having the result store, we can now query the result from the previous day and
report if the build is newly broken or recovered overnight.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79565536

fbshipit-source-id: ba839b2950462a7ca6186a163f93f062719304fb
2025-08-06 03:04:02 -07:00
Riccardo Cipolleschi
75e04b8c41 Add documentation for updating the issue triage oncall
Summary:
This Diff simply adds some docs on how the secret must be formatted, and removes a print that would expose the triager IDs is anyone would look at the logs (not a big deal given that the ids are public on Discord, though).

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D79556988

fbshipit-source-id: 23d6e72141dff4e91242cc1d9f5b95ebaf5ca858
2025-08-04 08:28:48 -07:00
Sam Zhou
16fa3d5da4 Update prettier-plugin-hermes-parser in fbsource to 0.31.1 (#52996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52996

Bump prettier-plugin-hermes-parser to 0.31.1.

Changelog: [internal]

Reviewed By: pieterv

Differential Revision: D79481936

fbshipit-source-id: 4decd5c92722f935a6a03b6d2205bc31b864fb5d
2025-08-01 20:18:36 -07:00
Riccardo Cipolleschi
bfc841d71d Change polling to try and download the pom manifest (#52512)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52512

The way Maven works is that the artifacts are uploaded and available way before the browsing UI will allow us to browse them.

By trying to download the `.pom` file instead of checking for the browsing website to be visible, we can shave some minutes during the release

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D78008635

fbshipit-source-id: 96516163628d6d25db385d996a11b4af78db764a
2025-07-09 08:12:58 -07:00
Mateo Guzmán
ccc8ce0d01 Remove lint-java (#52092)
Summary:
Following up from https://github.com/facebook/react-native/pull/52064#discussion_r2151906096, this PR removes lint-java and its related files.

The codebase is moving entirely to Kotlin and a Kotlin linter is being setup as well, the usage of the Java linter will become unnecessary.

## Changelog:

[INTERNAL] - Remove lint-java

Pull Request resolved: https://github.com/facebook/react-native/pull/52092

Test Plan: Relying on CI here to be green.

Reviewed By: cortinico

Differential Revision: D76880712

Pulled By: sbuggay

fbshipit-source-id: 2736772e7347f435b17d007e0322e1afc2fb2d7b
2025-06-18 08:22:04 -07:00
Tim Yung
683054c512 RN: Move {packages => private}/react-native-bots (#51932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51932

Moves `packages/react-native-bots` to `private/react-native-bots`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76354266

fbshipit-source-id: 6ca714c8b0c881b073d84a2f033f78d366ed3f24
2025-06-10 16:37:49 -07:00
Tim Yung
cf9d28a097 RN: Improve lint-ci Script (#51853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51853

While testing D75988059 with D76047973, I noticed a few opportunities to improve the script used by `yarn lint-ci`:

- The exit code does not currently propagate, meaning `lint-ci` will succeed when it shouldn't.
- The shell script uses some non-idiomatic practices, so this improves it.

Changelog:
[Internal]

Reviewed By: kassens, cipolleschi

Differential Revision: D76049502

fbshipit-source-id: ebefddf0909edc89cd97de756b93bfaaa3d7cdef
2025-06-05 10:14:06 -07:00
Nicola Corti
4fda28ee4c Remove the "Newer Patch Available" logic from @react-native-bot (#51286)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51286

This bog action is not really useful. It's currently buggy and spams the user twice + we agreed it provide little value for the user.
Therefore we're removing this message for the time being.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D74645716

fbshipit-source-id: a6b8aa6aa3f3f101ad649d2590bbcb2dc80ee30a
2025-05-13 10:38:05 -07:00
Riccardo Cipolleschi
91829bef5a Integrate sending notification to discord (#50979)
Summary:
As part of the work to integrate libraries with our nightlies, we want to receive a message when the libraries are failing to build on discord. This will help us catch breaking changes early on and onboarding library maintainer as soon as possible.

## Changelog:
[Internal] - Integrate with Discord when nightly fails

Pull Request resolved: https://github.com/facebook/react-native/pull/50979

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D73845810

Pulled By: cipolleschi

fbshipit-source-id: c6cfdf16b29642b1c3ad3872096c0e815fa88a0a
2025-04-29 08:57:30 -07:00
Nicola Corti
12def6d730 Update the reproducer message (#50848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50848

This clarifies our reproducer guidelines.
It's also currently pending on this other PR on the website:
https://github.com/facebook/react-native-website/pull/4589

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73194317

fbshipit-source-id: 35a0e6b4def734c8cff5099ab426d024f9ff6c4d
2025-04-22 09:40:35 -07:00
Alex Hunt
16a61bf2ba Remove .npmignore files from other packages, add lint check (#50786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50786

Follows https://github.com/facebook/react-native/pull/50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73193257

fbshipit-source-id: de715d74195e4f53c817c11f244a61c79b8ce5bc
2025-04-17 12:48:28 -07:00
Riccardo Cipolleschi
b028f84233 Fix check nightlies by escaping the artifact folder (#50726)
Summary:
The check nightlies job is failing on some libraries because the library key contains `/` and ` ` characters that fails to be used properly when they are part of a path.
With this change, we are replacing those characters with `_` so this is a valid path were CI can save the outcome that needs to be collected later.

## Changelog:
[Internal] - Fix folder path

Pull Request resolved: https://github.com/facebook/react-native/pull/50726

Test Plan: Running in GHA

Reviewed By: cortinico

Differential Revision: D73036049

Pulled By: cipolleschi

fbshipit-source-id: 147b9fa15b4dfa08e94f01715e5a175479230d80
2025-04-15 09:37:11 -07:00
Fabrizio Cucci
453c5e8f48 Fix verifyPublishedTemplate after failure for 0.79.0 (#50554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50554

This should fix the issue found during the 0.79.0 release.

https://github.com/facebook/react-native/actions/runs/14329766551/job/40166165007

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D72637751

fbshipit-source-id: 1b3ccbab162f484c96e5ff768766848f82acd818
2025-04-08 06:35:02 -07:00
Riccardo Cipolleschi
890b8f7ea3 Automate the rotation of issue trage squad (#50526)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50526

This change wants to automate the rotation of the issue triaging squad on Discord.
This is taking us a few minutes every week to rotate the oncall.

This change can save us some time.

The configuration file format is supposed to be like this:
```
{
  "userMap": {
     "discord-username1": "discord-id1",
     "discord-username2": "discord-id2",
     "discord-username3": "discord-id3",
     "discord-username4": "discord-id4"
   },
  "schedule": {
    "date1": ["discord-username1", "discord-username2"],
    "date2": ["discord-username3", "discord-username4"],
  }
}
```

## Changelog
[Internal] - Automate the issue triage oncall rotation

Reviewed By: cortinico

Differential Revision: D72569435

fbshipit-source-id: 435c13350cf503e99302775674e78a20e328e68d
2025-04-08 02:43:44 -07:00
Riccardo Cipolleschi
26a6ae0e89 Collect nightlies results (#50488)
Summary:
This change adds a job to collect nightlies results so we can then post on discord or internally

## Changelog:
[Internal] - Add a job to collect nightlies results

Pull Request resolved: https://github.com/facebook/react-native/pull/50488

Test Plan: GHA - tested as a job on PRs: https://github.com/facebook/react-native/actions/runs/14283415968/job/40035831913

Reviewed By: cortinico

Differential Revision: D72555358

Pulled By: cipolleschi

fbshipit-source-id: 35ec7e571992f5f27179256570b5d143e0d76586
2025-04-07 09:55:14 -07:00
Riccardo Cipolleschi
a29d5a2401 Automate the draft release creation (#50346)
Summary:
This PR automates the creation of Draft releases on Github that we have to do manually every time we create a new release.

## Changelog:
[Internal] - Automate the creation of draft releases on Github

Pull Request resolved: https://github.com/facebook/react-native/pull/50346

Test Plan:
GHA - tested as a separate workflow: https://github.com/facebook/react-native/actions/runs/14132774202/job/39597050776?pr=50346

The drafted release is at: https://github.com/facebook/react-native/releases/tag/untagged-e78c788fe9c861ad28ff

Reviewed By: cortinico

Differential Revision: D72061067

Pulled By: cipolleschi

fbshipit-source-id: ddcdae701e272a59c18f58ba431d1eb3b8cd5b36
2025-03-28 10:57:31 -07:00
Riccardo Cipolleschi
2c343d18a7 Generate the changelog automatically (#50323)
Summary:
This change implements the automatic generation of the Changelog in CI while doing a release.
The output is a PR opened by the react-native-bot that can be manipulated and imported by Meta engineers

## Changelog:
[Internal] - Generate the changelog automatically

Pull Request resolved: https://github.com/facebook/react-native/pull/50323

Test Plan:
Tested as a separated workflow first:
<img width="1624" alt="Screenshot 2025-03-27 at 17 44 47" src="https://github.com/user-attachments/assets/b8877cdb-f63b-4d82-b340-54f612ac0cd4" />
this generated the PR:
https://github.com/facebook/react-native/pull/50328

I also added jest tests:
<img width="516" alt="Screenshot 2025-03-27 at 17 45 39" src="https://github.com/user-attachments/assets/7ebbc310-e41e-48fc-997e-21366c7306cf" />

Reviewed By: cortinico

Differential Revision: D71986909

Pulled By: cipolleschi

fbshipit-source-id: 10ffaf342bb0642a6992a107185b6704815b16e3
2025-03-28 04:25:06 -07:00
Riccardo Cipolleschi
4b82896390 Automate checking for artifacts on Maven (#50275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50275

This change adds a check to automate a step in the release process: https://github.com/reactwg/react-native-releases/blob/main/docs/guide-release-process.md#verify-assets-have-been-uploaded-to-maven

The script will poll maven for 90 minutes and return when the artifacts are available. If, after 90 minutes, artifacts are not available, it exits with code 1 that should fail the Release workflow. The Release Crew should have a look at what's happened.

## Changelog:
[Internal] - Automate the check for artifacts being on Maven

Reviewed By: fabriziocucci

Differential Revision: D71825014

fbshipit-source-id: 8879bf9c8fc4519e86b55ad8f9bd3ecf3f8ecfb7
2025-03-26 08:26:01 -07:00
Riccardo Cipolleschi
10bbdb8679 Fix verifyReleaseOnNPM by dropping the v in the version (#49944)
Summary:
GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here.
We can fix the script by dropping the `v` when it is passed to the function.

bypass-github-export-checks

## Changelog:
[Internal] - Fix verifyPackageOnNPM

Pull Request resolved: https://github.com/facebook/react-native/pull/49944

Test Plan: GHA

Reviewed By: cortinico, fabriziocucci

Differential Revision: D70960414

Pulled By: cipolleschi

fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f
2025-03-11 04:05:11 -07:00
Riccardo Cipolleschi
70c3b2dcff Fix release scripts to check npm packages (#49788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49788

Release of 0.78 was successful but it failed to verify the package of NPM because of some error in the JS files.

Preparing for 0.79, I discovered some other issues in the NPM checking scripts.

This change should fix them.

## Changelog:
[Internal] - Fix publishing scripts

Reviewed By: fabriziocucci

Differential Revision: D70489717

fbshipit-source-id: 02a37d9a86fe108c7f7d2d634b8c0727dabb153d
2025-03-03 06:54:54 -08:00
Rob Hogan
47a21740cd Scripts: remove checked-in debugger; statements (#49289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49289

These snuck in, presumably accidentally, via https://github.com/facebook/react-native/pull/49164.

This interferes with running test suites with a debugger connected (e.g, when debugging Jest itself).

(Aside: we should probably enable [`eslint/no-debugger`](https://eslint.org/docs/latest/rules/no-debugger) to catch these)

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D69377992

fbshipit-source-id: 5d51d18be76f9b01852b2e5b7297b95452f36d55
2025-02-10 00:52:43 -08:00
Riccardo Cipolleschi
9d4c4b2741 Fix typo in verifyReleaseOnNPM-test file (#49207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49207

Renamed `verifyReleaseOnNPM-test` to `verifyRNReleaseOnNpm-test`.

## Changelog:
[Internal] - rename a test file for CI script

Reviewed By: huntie

Differential Revision: D69183614

fbshipit-source-id: 7a2c2804617f380758a53438598bb6fe0e27e68d
2025-02-06 03:39:15 -08:00
Riccardo Cipolleschi
1dd464d84e Remove last remnant of CircleCI from CI scripts (#49201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49201

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from CI scripts

Reviewed By: huntie

Differential Revision: D69182535

fbshipit-source-id: 4e825b65b5f5ca6ce16f5c7ac2f79088cf2d1ace
2025-02-05 09:55:00 -08:00
Riccardo Cipolleschi
a52f5514ed Automate the check for the Release on NPM (#49164)
Summary:
One of the steps we perform when doing a release is to run `npm view react-native` to verify that the release has been published and it is available with the right tag.
As of today, we check this manually.

This change aims at automating this check so that we don't have to do it manually ourselves.

## Changelog:
[Internal] - Releases: automate the npm view check

Pull Request resolved: https://github.com/facebook/react-native/pull/49164

Test Plan:
Created a veriftyReleaseOnNPM-tests.js jest test to verify that the script works fine.

<img width="667" alt="Screenshot 2025-02-04 at 15 18 24" src="https://github.com/user-attachments/assets/cf08155f-80da-4e15-a922-5c16f3fd806e" />

Reviewed By: cortinico

Differential Revision: D69118622

Pulled By: cipolleschi

fbshipit-source-id: a8d40cd2fcb164d8f7174de680b340510f3e8551
2025-02-05 06:33:57 -08:00
Riccardo Cipolleschi
ae7175d0ab Move analisys scripts to .github folder (#49123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
2025-02-03 10:02:19 -08:00
Riccardo Cipolleschi
9bf7aff882 Fix code to record and upload videos (#48444)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48444

While debugging why the Debug variant was failing, I realised that the code to store video artifacts and the code to record the videos were not working properly.

This diff fixes that

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67760436

fbshipit-source-id: ee4b034f7c54cbf0b46c0afc16c31389b11353fe
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
93117ea1b8 Move E2E scripts to js (#48419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48419

This change moves the E2E scripts for iOS to a JS script.
This should make it much easier to modify the code in case we need to change it.

## Changelog
[Internal] - Move e2e script from bash to JS

Reviewed By: cortinico

Differential Revision: D67737950

fbshipit-source-id: d0b0411c8a4d688c10e460e70b11dbfc83aaa135
2024-12-31 09:21:18 -08:00
Riccardo Cipolleschi
4a667e1a50 Set timeout for E2E tests. (#48381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48381

Right now, the E2E tests for RNTester does not have a timeout.
It can happen that the emulator get stuck and the action times out.

The default timeout is 6 hours, which is definitely too much and wasteful, so let's reduce it to 1 hour.

{F1974112110}

## Changelog:
[Internal] - Set timeout for E2E tests to 1 hour

Reviewed By: robhogan, blakef

Differential Revision: D67620423

fbshipit-source-id: c507d1222fca49287fafe6da4bffe559d8687b99
2024-12-24 08:15:22 -08:00
Riccardo Cipolleschi
953889da51 Stabilize Android tests adding retries for failed tests (#48324)
Summary:
Sometimes, specific E2E tests can fail. This change tries to run specific E2E tests with retries, to compensate for their flakyness.

## Changelog:
[Internal] - Add single test retry for Android E2E tests

Pull Request resolved: https://github.com/facebook/react-native/pull/48324

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D67396758

Pulled By: cipolleschi

fbshipit-source-id: 7d806fe7354bd9e826c591ea9628c73c3b258fce
2024-12-20 06:19:17 -08:00
Riccardo Cipolleschi
4c4c87beaf Improve metro waiting times in E2E (#48281)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48281

While working on Maestro E2E I realized that we were waiting for Metro to start even when metro was not running.

This moves the waiting only when metro is actually started.

I also added another waiting point as it takes several seconds for the app to load the bundle from metro the first time. Subsequent attempts are faster as the metro cache is warm.

## Changelog:
[Internal] - Improve metro waiting times in E2E

Reviewed By: fabriziocucci

Differential Revision: D67273648

fbshipit-source-id: 912be4d14869c8ce87d7c4e4f7ee37b643f5845c
2024-12-17 03:45:18 -08:00
Riccardo Cipolleschi
9f4b4aba93 Test Old Arch with Maestro (#48244)
Summary:
This pr tests the Old Arch on the Template app using Maestro

## Changelog:
[Internal] - Test old arch in CI with Maestro for template app

Pull Request resolved: https://github.com/facebook/react-native/pull/48244

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D67141524

Pulled By: cipolleschi

fbshipit-source-id: bef3a9b6fec9d7c91d858d534a2d00e91f1842b5
2024-12-12 09:01:31 -08:00
Nicola Corti
a3ab7895c9 Add missing \n on actOnLabel.js (#47451)
Summary:
I forgot to add some `\n` in the bot messages. This fixes it.

## Changelog:

[INTERNAL] - Add missing `\n` on actOnLabel.js

Pull Request resolved: https://github.com/facebook/react-native/pull/47451

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D65533495

Pulled By: cortinico

fbshipit-source-id: c2214d00800f6b70ec331a9ae72578414f50cd43
2024-11-06 08:54:10 -08:00
Nicola Corti
c4f58d2452 Update messages for @react-native-bot (#47428)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47428

This changes the messages that the bot is printing.
I've moved from using a table to using GitHub's admonitions that
renders nicely are are more informative.

Changelog:
[Internal] [Changed] - Update messages for react-native-bot

Reviewed By: mdvacca

Differential Revision: D65485633

fbshipit-source-id: f43f7bd75280bfd0aceab48b2517306c1057b778
2024-11-05 14:33:29 -08:00
Nicola Corti
d2a91617da Prevent @react-native-bot from double posting on missing reproducer (#47427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47427

I've noticed that react-native-bot posts twice once we can't find a reproducer.
(see here: https://github.com/facebook/react-native/issues/47421)

This fixes it by letting it post only once.

Changelog:
[Internal] [Changed] - Prevent react-native-bot from double posting on missing reproducer

Reviewed By: mdvacca

Differential Revision: D65485634

fbshipit-source-id: dbe9b1311aef246dead6d9b922c1256363e894f7
2024-11-05 14:33:29 -08:00