Граф коммитов

22 Коммитов

Автор SHA1 Сообщение Дата
Riccardo Cipolleschi 9344c7aa5a fix: try to run dange in PR correctly (#34375)
Summary:
After https://github.com/facebook/react-native/issues/34370, Danger started failing because the `DANGER_GITHUB_API_TOKEN` was not properly set.
This PR fixes it.

## Changelog

[General] [Changed] - Set back the `DANGER_GITHUB_API_TOKEN`.

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

Test Plan: Danger GitHub action is executed correctly.

Reviewed By: cortinico

Differential Revision: D38571718

Pulled By: cipolleschi

fbshipit-source-id: 51168098b4f910f6fefd2872f917e12daad1ec4c
2022-08-10 04:23:21 -07:00
Nicola Corti 665b5bedd3 Let danger run on `pull_request_target` (#34370)
Summary:
This is a nit. Did some cleanups on our Danger setup.
The most substantial work is:
- Moved over danger to run on `pull_request_target`. This allow us to re-use the Github Action access token without having to provide one.
- Fixed an issue with the `Pick Request` label which was not applied correctly.
- Removed the danger_id as we were not passing it correctly.

## Changelog

[Internal] - Let danger run on `pull_request_target`

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

Test Plan: Tested locally with `yarn danger pr https://github.com/facebook/react-native/pull/34197`

Reviewed By: cipolleschi

Differential Revision: D38533144

Pulled By: cortinico

fbshipit-source-id: 178ce411eb956870563c4d51719ed4dae1f1536d
2022-08-09 06:34:32 -07:00
Nicola Corti da961f480b Setup Automatic Rebase given a /rebase comment (#34369)
Summary:
This is a nit, but at least will help us reduce requests to rebase for PRs which maybe have a broken CI due to a stale base commit.

I've limited the scope to members and owners. A `/rebase` will trigger a rebase authored by Github Action bot.

We can play a bit around with it, and remove it if it doesn't really work well for us.

## Changelog

[Internal] - Setup Automatic Rebase given a /rebase comment

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

Test Plan: Nothing to test here.

Reviewed By: cipolleschi

Differential Revision: D38509480

Pulled By: cortinico

fbshipit-source-id: 1df3927638b162d4a787c81372a835d583159498
2022-08-09 04:38:56 -07:00
Riccardo Cipolleschi 1bba59023d Run ESLint in Danger (#34305)
Summary:
This PR runs eslint in PR using Danger.

## Changelog

[General] [Changed] - Run ESLint in CI

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

Test Plan:
1. Add a JS lint error in the package/react-native-codegen package.
2. Observe the CI task post a message with the errors
3. Fix the errors
4. Observe the CI task report completion with no errors

Reviewed By: cortinico

Differential Revision: D38315268

Pulled By: cipolleschi

fbshipit-source-id: 9984402ee427dd62d47dd716f73c030e6d0f7b5e
2022-08-02 06:53:35 -07: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
Franco Meloni 55133eaa25 Use pullbot token instead of GITHUB_TOKEN on the Danger Action (#33900)
Summary:
GITHUB_TOKEN doesn't have write permissions on forks, using the pullbot token instead.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

## 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
-->
[Internal] - Use pullbot token instead of GITHUB_TOKEN on the Danger Action

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

Test Plan: CI will validate it

Reviewed By: cipolleschi

Differential Revision: D36627043

Pulled By: f-meloni

fbshipit-source-id: bc7ff2f463c9d7cac61d362440858945edfbdbaf
2022-05-24 06:20:58 -07:00
Franco Meloni b149d2a0d6 Run Danger on all the PRs and use fail or warning where is needed (#33872)
Summary:
Run Danger on all the PRs, not just on the forks, use fail or warning where is needed and make CircleCI fail if danger fails

## 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
-->

[Internal] - Run Danger on all the PRs and use fail or warning where is needed.

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

Test Plan: Run the change on CirlceCI

Reviewed By: cortinico

Differential Revision: D36516847

Pulled By: f-meloni

fbshipit-source-id: 2c956295a56cc8aa47df4c64f8ca0a211796c73c
2022-05-23 01:12:25 -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
Nicola Corti 3220029514 Fix broken Test Docker Android
Summary:
Test Docker Android is failing with `No space left on device`
I've fixed it by freeing up some space on the runner.

I'm looking into potentially removing this job entirely as I believe it's not
really helpful at the moment.

Changelog:
[Internal] [Changed] - Fix broken Test Docker Android

Reviewed By: ShikaSD

Differential Revision: D35013831

fbshipit-source-id: 594e65fa05c7dfc8b5acfde88658b341d26aa586
2022-03-21 11:42:18 -07:00
Nicola Corti 0fba8fa443 Reduce stale range from 365 days to 180 days
Summary:
We have a lot of stale issues that are receiving essentially no traffic. Previously we used to use `stalebot` which had an interval of 90 days but was somehow unreliable. Now we moved to the state GH actions but with an interval of 365 days which I believe is potentially too high.

Changelog:
[Internal] [Changed] - Reduce stale range from 365 days to 180 days

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: GijsWeterings

Differential Revision: D34831199

fbshipit-source-id: 70f3f6cc97ac4add625061577e53cc80da987c7a
2022-03-16 03:04:41 -07:00
Gabriel Donadel Dall'Agnol f7a66e6291 ci: Bump actions-apply-version-label to 0.0.3 (#32979)
Summary:
This PR  bumps the `actions-apply-version-label`  version to 0.0.3 in order to fix an issue where we were throwing an error when the identified label does not exist, instead we should just report a warning. This also updates `apply-version-label-issue.yml` to use `actions-apply-version-label` from `react-native-community` as it has been recently transferred to the community

## Changelog

[Internal] [Fixed] - Fix `actions-apply-version-label` error when version label is missing

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

Test Plan:
Open an issue with a missing version label and ran the new action version

https://github.com/gabrieldonadel/actions-apply-version-label/actions/runs/1756805059

Reviewed By: ShikaSD

Differential Revision: D33819052

Pulled By: cortinico

fbshipit-source-id: 49c719e729e3085e78b1c43143c2d41a03e797e4
2022-01-28 06:10:35 -08:00
Gabriel Donadel Dall'Agnol 4f1f42b076 ci: Add github action to apply version label to pre-release issues (#32957)
Summary:
Add workflow to automatically label issues with the `Type: Upgrade Issue` label as `Version: XX` using [actions-apply-version-label](https://github.com/marketplace/actions/apply-version-label-to-issue-with-specific-label) github action.

Closes https://github.com/facebook/react-native/issues/32691

## Changelog

[Internal] [Added] - Add github action to apply version label to pre-release issues

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

Test Plan:
As I don't have admin rights to this repo I merged these same changes  in my fork (https://github.com/gabrieldonadel/react-native/pull/3) and tested this action by opening [an issue](https://github.com/gabrieldonadel/react-native/issues/5) tagged as `pre-release`

https://user-images.githubusercontent.com/11707729/150696182-82381f86-78af-4ba0-a94c-e5780ee54316.mov

## Next steps

Transfer [core-workflow-apply-version-label](https://github.com/gabrieldonadel/core-workflow-apply-version-label) to [react-native-community](https://github.com/react-native-community)

Reviewed By: lunaleaps

Differential Revision: D33744979

Pulled By: cortinico

fbshipit-source-id: c917b62d3aa561d779d6e2c94a7af69cd462b60e
2022-01-25 12:23:38 -08:00
Luna Wei 63ec8efe58 Remove version Github actions for now
Summary: Changelog: [Internal] Remove this workflow for now as there are some errors and we want to revisit this action and move it under react-native-community

Reviewed By: sota000

Differential Revision: D33103444

fbshipit-source-id: c64bb79df8700af110ddbfbfa3d60ac9a849c964
2021-12-14 13:43:25 -08:00
Nicola Corti 6abf8b4f05 Do not report a CI failure if add-version-label-issue is red
Summary:
The `add-version-label-issue` CI is failing if the version label is not found.
That is happening for previous versions of RN where the Labels are missing.

Changelog:
[Internal] [Changed] - Do not report a CI failure if add-version-label-issue is red

Reviewed By: sammy-SC

Differential Revision: D32723953

fbshipit-source-id: 878d2632b3a78311a01363b8f8a9181ae543a253
2021-11-30 09:40:09 -08:00
Lucas Bento e973b3afc2 Bump `core-workflow-apply-version-label` version (#32565)
Summary:
Fix the issue with the label not being applied correctly to issues.

## Changelog

N/A

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

Reviewed By: cortinico

Differential Revision: D32283554

Pulled By: lunaleaps

fbshipit-source-id: 77de56ef3a3dd9b87d1addc3d6d5deb08817d2d0
2021-11-09 09:30:35 -08:00
Lucas Bento aa515450fe Fix issues with `-rc` version not being labeled properly (#32522)
Summary:
This PR bumps https://github.com/lucasbento/core-workflow-apply-version-label which fixes the issue with versions having `-rc` not working.

## Changelog

N/A.

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

Reviewed By: yungsters

Differential Revision: D32115258

Pulled By: lunaleaps

fbshipit-source-id: ece8400f223640f8b75141f0e3286888a72c996b
2021-11-03 12:01:42 -07:00
Lucas Bento 60352a9549 Add workflow to create version labels on new releases (#32508)
Summary:
This PR adds the following GitHub actions:

- https://github.com/lucasbento/core-workflow-create-version-label - Create version labels (such as `Version: 0.65.1`) whenever there's a new release;
- https://github.com/lucasbento/core-workflow-apply-version-label - Apply a version label to opened/edited issues based on the version mentioned on the issue body.

## Changelog

N/A.

## Few things to keep in mind

- A label named "Version: unspecified" must be created;
- The GitHub action to create labels will only run when there's a new release or if one is edited, it will then create all the other labels bases on the previous releases until it encounters one that already exists.

 ---

Example of issue with version label: https://github.com/lucasbento/test-issue-forms/issues/4

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

Reviewed By: cortinico

Differential Revision: D32055682

Pulled By: lunaleaps

fbshipit-source-id: 04d3e942eb1f71b3bc1d5a643b0156c35ef5f00b
2021-11-01 11:41:19 -07:00
Nicola Corti 37efe38e6c Add stale action to close older issues/PR that are more than one year inactive (#32403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32403

As the title says, we should cleanup issues that are really stale (i.e. more than one year inactive).
I ended up using actions/stale which is the first party solution for this.

Changelog:
[Internal] [Changed] - Add stale GitHub action

Reviewed By: hramos

Differential Revision: D31653083

fbshipit-source-id: 48538a571183f9ff28a23e7d1fdd01980581de35
2021-10-15 03:12:00 -07:00
Héctor Ramos 232d02c5f6 Move Docker test to GitHub Actions
Summary:
The test_docker_android job on Circle CI has a simple function: verify the base community RN Android image can be downloaded, and verify that we can use it to build a container with a compiled Android test app.

Since the job is not strictly running a suite of tests, it can be moved to GitHub Actions. It will run on GitHub Actions as a Check on commits to main and pull requests.

As building the test image requires the use of the base React Native Android image, we can skip downloading the base container and go straight to building the test image.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D31521978

fbshipit-source-id: ca8372a1464054e37f2da28a3ecfbc8f84db0408
2021-10-09 11:37:53 -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
Héctor Ramos f9c2157141 Add Author Feedback label automatically (#28484)
Summary:
Improve issue triage by automatically adding the "Needs: Author Feedback" label.

NOTE: The old label-actions app should be disabled when this PR is merged: https://github.com/apps/label-actions/installations/7445225

## Changelog

[Internal] - Issue Triage
Pull Request resolved: https://github.com/facebook/react-native/pull/28484

Test Plan: Verified the same `label-actions.yml` and workflow config on a private repo.

Reviewed By: cpojer

Differential Revision: D20817443

Pulled By: hramos

fbshipit-source-id: 39732dd67509c9fb9cf6ff7306913f5ec088266d
2020-04-03 10:52:31 -07:00
Héctor Ramos 2ef9200a4d Enable 'Needs Attention' action (#28338)
Summary:
The ['Needs Attention'](https://github.com/hramos/needs-attention) action will remove the "Needs: Author Feedback" label and replace it with "Needs: Attention" whenever the original author of an issue adds a comment.

Removes the `no-response` GitHub integration. The 'close after 21 days' functionality from `no-response` is not present in the 'Needs Attention' action. We'll need to add this back some other way. Considering we were not closing issues that were in the Needs Response state until recently, I think it's OK to proceed here.

## Changelog

[Internal] [CI] - Enable 'Needs Attention' action
Pull Request resolved: https://github.com/facebook/react-native/pull/28338

Test Plan: https://github.com/hramos/needs-attention/issues/1

Reviewed By: cpojer

Differential Revision: D20506380

Pulled By: hramos

fbshipit-source-id: a5a0a7fc330821b7c51aabc0905f520d5caa829a
2020-03-18 00:41:44 -07:00