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

9 Коммитов

Автор SHA1 Сообщение Дата
kacperkapusciak 54d70cf0c6 Prevent check-for-reproducer action trigger on Umbrella and old issues (#38664)
Summary:
This PR resolves problems with too spammy `check-for-reproducer` action triggering on very old and most prominently the Umbrella issues.

Also, it brings back triggering on edited issues removed in https://github.com/facebook/react-native/pull/38634

Related to https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues

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

Test Plan: <img width="470" alt="image" src="https://github.com/facebook/react-native/assets/39658211/1d840145-1e4f-43c5-a3ea-bc16e61071ef">

Reviewed By: cipolleschi

Differential Revision: D47868536

Pulled By: cortinico

fbshipit-source-id: fd78c38145c76f3867a41439aee5d087f38c85d2
2023-07-28 08:50:35 -07:00
Nicola Corti bae0016dc9 Properly split the "Too Old Version of React Native" message
Summary:
The bot message is split in a wrong way:
https://github.com/facebook/react-native/issues/38603#issuecomment-1648749441
I'm updating it to use `<br/><br/>` instead which renders correctly inside tables.

Changelog:
[Internal] [Changed] - Properly split the "Too Old Version of React Native" message

Reviewed By: NickGerleman

Differential Revision: D47764363

fbshipit-source-id: 7a80f03b4228a3f0c69d718b8eb60ecd4ac60a2b
2023-07-25 21:49:41 -07:00
kacperkapusciak 3f78fa953a Fix checkForReproducer action not adding Missing Repro comment (#38531)
Summary:
This PR fixes a bug where GitHub Actions bot didn't add a comment when "Needs: Repro" label was present in an issue.

When a maintainer adds the label manually the bot comments with "Missing Reproductible Example" as normally.

It seems like the problem occurred because of a difference in a sandbox repository and the proper facebook/react-native repo environment.

My sandbox that I used to test https://github.com/facebook/react-native/pull/38338 had an "bot" account with Personal Access Token setup to reply to issues. Turns out that bots using PAT have more permissions and can trigger one action from the other.

**The solution is to send the comment directly from the `checkForReproducer` action.** This won't collide with other actions but sadly will duplicate the sending logic into two actions.

This PR also makes the bot respect when a maintainer removes and adds a label by hand and won't alter the maintainer decision.

Related to ☂️ https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Message

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

Test Plan: ![image](https://github.com/facebook/react-native/assets/39658211/b956416f-9834-4c61-981f-fe6c17a5eec5)

Reviewed By: cipolleschi

Differential Revision: D47666922

Pulled By: cortinico

fbshipit-source-id: 4a6a471cb11c6ed9b48263d18bf8e283577a14bb
2023-07-21 08:46:03 -07:00
kacperkapusciak 42a2898617 Add check-for-reproducer action (#38338)
Summary:
This PR adds a "check-for-reproducer" GitHub action proposed in https://github.com/facebook/react-native/issues/35591.
This GitHub action automatically labels an issue with when no link to GitHub repository under the authors name or link to Snack is present either in the issue body or in the comments.

## Changelog:

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

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [ADDED] - Add check-for-reproducer GitHub action

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

Test Plan:
This action was tested on a private repro mimicking on how GitHub actions are set-up in `facebook/react-native` repository. If you'd want to play around with the action on this private repo just ask for access - provided you're a maintainer.

### Regarding issue body

1. Labels "Needs: Repro" when no link to Expo Snack or a Github repo under the author's name is present in the issue body:

![image](https://github.com/facebook/react-native/assets/39658211/b8e6d4aa-bc9a-471d-99b8-3b551f2c46c6)

2. Removes the "Needs: Repro" label and deletes the Missing Repro comment when the author edits the issue and provides a link to GitHub repo under their name

![image](https://github.com/facebook/react-native/assets/39658211/2dc13fae-b6ca-432f-88a2-f5c340f28c86)

3. Removes the "Needs: Repro" label and deletes the Missing Repro comment when the author edits the issue and provides a valid link to Expo Snack

![image](https://github.com/facebook/react-native/assets/39658211/e82e744e-b2fb-4979-84de-08f95686feb3)

### Regarding comments

3. Removes the "Needs: Repro" label and deletes the Missing Repro comment when there's a comment with a link to reproduction under issue author's name

![image](https://github.com/facebook/react-native/assets/39658211/eefb5978-29d3-4486-8bd7-878fb2c07c05)

4. Removes the "Needs: Repro" label and deletes the Missing Repro comment when there's a comment with a link to Expo Snack

![image](https://github.com/facebook/react-native/assets/39658211/5769ff77-0d9f-4dac-bb36-6d257e6c2a35)

### Regarding false-positives

5. Adds a "Needs: Repro" label when a link to reprository isn't under the issue author's name

![image](https://github.com/facebook/react-native/assets/39658211/01c93ea3-88b9-4920-a8f8-bcd123d214de)

6. Adds a "Needs: Repro" label when a link to Expo Snack's homepage was sent

![image](https://github.com/facebook/react-native/assets/39658211/568c9824-67af-402a-b102-c1c355651d21)

7. Adds a "Needs: Repro" label when a random link was sent

![image](https://github.com/facebook/react-native/assets/39658211/23bb58b3-cc07-4284-a562-6651f2077a3c)

Reviewed By: NickGerleman

Differential Revision: D47511745

Pulled By: cortinico

fbshipit-source-id: 2c0e5a989f52b4e50992a3954283f122b14153e0
2023-07-19 02:38:28 -07:00
Pranav Yadav 28dfdb22eb Auto close issue if version is too old (#38041)
Summary:
*Auto-close* an issue when the version of React Native specified is **TOO OLD**.
Applies `Type: Too Old Version` label and closes such issues using `actOnLabel` workflow.

## Changelog:

[GENERAL] [ADDED] - Auto close issue if version is too old.

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

Test Plan: - Should *auto-close* an issue with `Type: Too Old Version` label

Reviewed By: NickGerleman

Differential Revision: D47331471

Pulled By: cortinico

fbshipit-source-id: 516468299d6923ce72e073a3b7b8b8715d15d6e0
2023-07-10 08:17:16 -07:00
Aymane Missouri 805604d1e3 use TripleEqual instead of doubleEqual when comparing two string (#37673)
Summary:
It is generally recommended to use "===" instead of "==" when comparing two strings

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

Test Plan:
## Changelog:
[Internal] [Changed] - use TripleEqual instead of doubleEqual when comparing two string

Reviewed By: cipolleschi

Differential Revision: D46434681

Pulled By: cortinico

fbshipit-source-id: 70522a28799699854d2a4ab814e34ce796082025
2023-06-05 02:19:26 -07: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 e242a65c5b Update actOnLabel to include the official reproducer (#37023)
Summary:
I'm adding a reference to our official template in the Needs: Repro label response

## Changelog:

[INTERNAL] - Update actOnLabel to include the official reproducer

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

Test Plan: n/a

Reviewed By: mdvacca

Differential Revision: D45183426

Pulled By: cortinico

fbshipit-source-id: cd97981eda49ff7123f6beb05b6eb64b4899ded0
2023-04-21 09:35:16 -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