Commit Graph

14 Commits

Author SHA1 Message Date
Nicola Corti
2e55adf339 Act On label as @react-native-bot (#45541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45541

This is another round of letting react-native-bot do the job that the
generic GitHub Action bot was doing.

Changelog:
[Internal] [Changed] - Act On label as react-native-bot

Reviewed By: cipolleschi

Differential Revision: D59959468

fbshipit-source-id: 8e0f7e2e90a40ed2aa265e637c8a809064e22747
2024-07-19 05:38:49 -07:00
Nicola Corti
7c0c9a2b93 Cleanup the .github/workflows folder (#44857)
Summary:
Just doing some cleanup of the `.github/workflows` folder:
* apply-version-label-issue.yml hasn't been working since 0.72
* ios-tests is unnecessary as it's now covered by test-all
* nightlies-feedback.yml was experimental and last execution was ~5 months ago.

We can still recover them from the Git history if necessary.

## Changelog:

[INTERNAL] - Cleanup the .github/workflows folder

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

Test Plan: Will wait for CI result

Reviewed By: NickGerleman

Differential Revision: D58362912

Pulled By: cortinico

fbshipit-source-id: d886e4f077eebfdf906169f09f96a950a361cab7
2024-06-11 03:14:49 -07:00
m-nakamura145
dd4f15bf08 chore: Bump actions/checkout (#42952)
Summary:
GitHub is [planning to upgrade to Node 20](https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/). Versions prior to actions/checkout v3 use an outdated version of node, so we will upgrade to actions/checkout v4, where [Node 20 is the default](https://github.com/actions/checkout/releases/tag/v4.0.0).

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

chore: Bump actions/checkout

Pick one each for the category and type tags:

[INTERNAL] [FIXED] - chore: Bump actions/checkout

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - chore: Bump actions/checkout

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

Reviewed By: cipolleschi

Differential Revision: D53655117

Pulled By: cortinico

fbshipit-source-id: 7c05e6ac2cb71c9d20c0b28b183cada6856f0a2d
2024-02-12 02:12:40 -08:00
Olga Zinoveva
b6f269e8a3 Enhance labeling workflow (#37324)
Summary:
This PR does two things:
1. Improves the labeling workflow in cases where the user is on a supported version but a higher patch number is available. Now, the label name will be friendlier ('Newer Patch Available') and we will report the version they should consider upgrading to in the message body. Once this change is merged, I can also rename all existing versions of this label for consistency.
2. Moves the addDescriptiveLabels.js script to the workflow-scripts folder for consistency with the other workflow scripts.

## Changelog:

[INTERNAL] [CHANGED] - Enhancing issue triage workflow for patch versioning

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

Test Plan: See some examples of the workflow run in my fork: https://github.com/SlyCaptainFlint/react-native/issues

Reviewed By: cipolleschi

Differential Revision: D45680812

Pulled By: NickGerleman

fbshipit-source-id: 7ab07fcf52fe372d2e449bb43d6618b1c98e9245
2023-05-09 10:19:47 -07:00
Nicola Corti
de2f01d9d7 Do not store scripts inside .github/workflows (#36811)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36811

Editing frequently the `.github/workflow` folder makes harder to use the
`/rebase` command as it fails if there are edits to such folder in the middle
of a rebase.
I'm moving the .js files outside of that folder.

Changelog:
[Internal] [Changed] - Do not store scripts inside .github/workflows

Reviewed By: sshic

Differential Revision: D44705878

fbshipit-source-id: a8007d6c126dbda2a1ee9d8cb0397df5df43fd63
2023-04-05 05:25:35 -07:00
Olga Zinoveva
d038e4e3bf Add github workflow for automatic API, topic, and component labeling of issues (#36712)
Summary:
Adding a new github workflow script, which will run as part of the existing triage job that is triggered when an issue is  labeled with the "Needs: Triage" label (this typically happens automatically when the issue is created).
This script will add an extensive list of possible labels corresponding to APIs, components, and topics (see the code for the full list).
The motivation for this change is to replace the last bit of meaningful functionality performed by react-native-bot, which will allow us to decommission that bot in favor of using github workflows for all issue and PR automation.

## Changelog:

[INTERNAL] [CHANGED] - Updated API, topic, component labeling on issues to run from a GH workflow rather than an external bot action

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

Test Plan:
For examples of issues being labeled by this new script, see the open issues here: https://github.com/SlyCaptainFlint/react-native/issues
I did not test every possible label, but I tested at least one from each category (API, component, topic), and a combination of one or two of each.

Reviewed By: cortinico, cipolleschi

Differential Revision: D44593658

Pulled By: SlyCaptainFlint

fbshipit-source-id: 93758d05a70d02bed76ab0b6149271e757e0a12f
2023-04-04 15:49:01 -07:00
Nicola Corti
d56bd115fa Do not attempt to comment on PRs when on forks (#36316)
Summary:
I'm gating this workflow to run only upstream as I'm receiving notifications that it fails on my fork. We don't want to run this workflow on forks at all hence we can add a `if:` there.

## Changelog

[INTERNAL] - Do not attempt to comment on PRs when on forks

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

Test Plan: If Github Actions UI is green, we're good to go

Reviewed By: cipolleschi

Differential Revision: D43657315

Pulled By: cortinico

fbshipit-source-id: 8fb260d142a43375bd9a3b10eac235550a6aecb0
2023-02-28 07:36:06 -08:00
Olga Zinoveva
26b2bb5343 Add automatic RN version checking workflow (#36075)
Summary:
Adding automatic RN version checking github workflow, which will verify the version of RN listed on all new issues filed in the repository.
Additionally, this change refactors the existing labeler workflow to make it re-usable by the version check workflow. The change also creates a logical place to add future automatic detection checks, like auto-verification of repro, template, etc.
This is technically not new functionality, as the react-native-bot does this _sometimes_, but this should be a lot more reliable.
The logic for valid release checking follows what is listed in the documentation - valid versions are current and N-2 minors, with the highest available patches.

## Changelog

[INTERNAL] [FIXED] - Made the automated RN version checking workflow more reliable

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

Test Plan:
I have verified a variety of different versions on issues here: https://github.com/SlyCaptainFlint/react-native/issues
I have also re-verified all the tags that were previously handled by the labeler workflow, since I have refactored it. Please take a look at both the open and closed issues in the linked repo for examples.

Reviewed By: cortinico

Differential Revision: D43089150

Pulled By: SlyCaptainFlint

fbshipit-source-id: 7da67f5cb2a4875f22e1f9e46d7ca07d43f3e135
2023-02-22 21:26:36 -08:00
Blake Friedman
62fa6d9dac ci: Add Type: Expo label action (#36069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36069

This PR adds a github action to auto closes an issue labelled with `Type: Expo`.

Changelog:

[Internal][Added] - Support `Type: Expo` label action

Reviewed By: cortinico

Differential Revision: D43041449

fbshipit-source-id: 8ac29487b172acd5798c8c36f5ef89cf60e69d04
2023-02-06 08:18:54 -08:00
Blake Friedman
474c0edafe ci: Add unsupported-version label action (#35849)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35849

Users will provide issues or examples that use unsupported versions of React Native. Provide label to track and ask them to update example / issue to currently mainted version.

Changelog:

[Internal] - Support 'unsupported version' tag comment

Reviewed By: cortinico

Differential Revision: D42531703

fbshipit-source-id: 5577943a329e17147269b9e5a5da2b2c16a6ae3e
2023-01-17 04:21:57 -08:00
Nicola Corti
2d1d61a38c Move on-issue-labeled to use actions/github-script@v6 (#35474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35474

This cleans up our `on-issue-labeled` workflow and makes sure we use only github-scripts. So we don't need to checkout the code & run an external action.

Changelog:
[Internal] [Changed] - Move on-issue-labeled to use actions/github-script@v6

Reviewed By: cipolleschi

Differential Revision: D41522650

fbshipit-source-id: c93d10eddf5be2ca9f779389e8059633291c0138
2022-11-25 04:01:31 -08:00
Varun Sharma
3da3d82320 ci: Add GitHub token permissions for workflows (#34122)
Summary:
This PR adds minimum token permissions for the GITHUB_TOKEN using https://github.com/step-security/secure-workflows.

GitHub recommends defining minimum GITHUB_TOKEN permissions for securing GitHub Actions workflows
- https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
- https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
- The Open Source Security Foundation (OpenSSF) [Scorecards](https://github.com/ossf/scorecard) treats not setting token permissions as a high-risk issue

This project is part of the top 100 critical projects as per OpenSSF (https://github.com/ossf/wg-securing-critical-projects), so fixing the token permissions to improve security.

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>

## Changelog
[General] [Security] - Add GitHub token permissions for workflows
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D37597988

Pulled By: cortinico

fbshipit-source-id: 2f45914e2202a7b5bf7fa60b019dd12cdcf31952
2022-07-04 03:41:44 -07:00
Simek
09b06485e9 GitHub: update workflow actions (#33595)
Summary:
This PR updates the GitHub actions uses in the repository workflows.

## Changelog

N/A

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

Test Plan: Run the workflows.

Reviewed By: rickhanlonii

Differential Revision: D35495697

Pulled By: cortinico

fbshipit-source-id: a41a83dc61f199f9acbc0ce28d6a23fafc94a99c
2022-04-08 06:26:47 -07:00
Héctor Ramos
d0d2115bee Use renamed respond-to-issue-based-on-label GitHub Action. (#30832)
Summary:
We use the `respond-to-issue-based-on-label` GitHub Action to aid in issue triage. This is a trivial change to ensure we use the new, renamed version of the action.

## Changelog

[Internal] - Use renamed GitHub action

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

Test Plan: CI

Reviewed By: fkgozali

Differential Revision: D26702542

Pulled By: hramos

fbshipit-source-id: d9d3685f17bfc504fd7e31dee1c6c330e88ef1d1
2021-02-26 17:13:36 -08:00