-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
☂️ Improving react-native-bot
🤖
#35591
Comments
react-native-bot
🤖
On top of what you suggested @kelset:
For context if folks want to start moving the logic from |
@cortinico what do you think, do we still need this open? |
@kelset I think yes, I've also added more items to the list for ideas we collected. |
@cortinico the source code for "Needs repro" action that we use in Reanimated, Gesture Hander and Screens repos can be found here: https://github.com/software-mansion-labs/swmansion-bot/tree/main/needs-repro and an example of use: In React Navigation, it's all in one YAML file which works great but it's a bit cumbersome to test and maintain: https://github.com/react-navigation/react-navigation/blob/main/.github/workflows/check-repro.yml Cheers |
@kacperkapusciak awesome, are you up for integrating it inside |
@cortinico okay, I can spend some time on it Would you like me to integrate our Which one do you prefer? |
I think the best would be to have the logic inside https://github.com/facebook/react-native/tree/main/.github/workflow-scripts and copied over (for security reasons) |
@cortinico seems reasonable, I'll submit a PR in the following days |
@cortinico initial version is ready to check and open for discussion #38338 |
Summary: This PR adds a "check-for-reproducer" GitHub action proposed in #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: #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
Summary: This PR adds a "check-for-reproducer" GitHub action proposed in facebook#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: facebook#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
Summary: This PR fixes a bug with an issue labeling bot issues triggering on comments to pull requests. The action doesn't trigger when a pull request is open (but other actions add comments immediately). From [GitHub docs](https://docs.github.com/en/webhooks-and-events/events/issue-event-types): > GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. [...] Pull requests have a **`pull_request` property in the `issue` object.** ☝️ Which is a way to differentiate between an issue and a pull request Relates to a bug introduced in #38338 and links to ☂️#35591 ## Changelog: [INTERNAL] [FIXED] - Prevent issue bot triggering on pull requests Pull Request resolved: #38525 Test Plan: This PR makes use of `github.event.issue.pull_request` object which is null on issues and comments in issues: ![image](https://github.com/facebook/react-native/assets/39658211/e0a64039-5fb7-4ad3-95aa-65cb7c9f0a4b) and truthy on comments on pull requests ![image](https://github.com/facebook/react-native/assets/39658211/9df69d00-c792-4c00-bfc2-9ee832551d16) With a change from PR bot skips execution on comments on pull requests ![image](https://github.com/facebook/react-native/assets/39658211/f02687fb-f81b-4278-8d0e-9b23651229c1) Reviewed By: ryancat Differential Revision: D47628330 Pulled By: cortinico fbshipit-source-id: 63e7180bb57ffd34904414a702c02019e18a042b
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 #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 ☂️ #35591 ## Changelog: [INTERNAL] [FIXED] - Message Pull Request resolved: #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
#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 #38634 Related to #35591 ## Changelog: [INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues Pull Request resolved: #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
facebook#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 facebook#38634 Related to facebook#35591 ## Changelog: [INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues Pull Request resolved: facebook#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
facebook#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 facebook#38634 Related to facebook#35591 ## Changelog: [INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues Pull Request resolved: facebook#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
facebook#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 facebook#38634 Related to facebook#35591 ## Changelog: [INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues Pull Request resolved: facebook#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
@kelset I can help with |
PR is ready to review. Feedbacks are welcome :) #40655 |
Closing as most of the issues here have been implemented 👍 We'll come up with another round of improvements whenever we feel there is the need for |
What this is about
This umbrella issue wants to expand on some work that was started via this PR #35500 by @SlyCaptainFlint and on which we followed up with some conversations in the Discord with @cortinico.
The core goal is to improve the overall experience for both users and maintainers when interacting with the react-native repository, by leveraging "more and better" automations that are possible (mostly handled via the
react-native-bot
currently).Ideas
In no particular order:
render: shell
to properly render stacktraces andreact-native config
react-native doctor
We'll be using this issue to refine the list above, adding, removing, and editing points as needed, to then lead to PRs to apply them in the future.
The text was updated successfully, but these errors were encountered: