mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4221fc8a32
commit
12def6d730
@@ -111,7 +111,7 @@ module.exports = async (github, context, labelWithContext) => {
|
||||
case 'Needs: Repro':
|
||||
await addComment(
|
||||
`> [!WARNING]\n` +
|
||||
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li></ul>`,
|
||||
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Reproducers are **mandatory** and we can accept only one of those as a valid reproducer: <br/><ul><li>For majority of bugs: send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul><br/>You can read more about about it on our website: [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug).`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
|
||||
@@ -41,6 +41,11 @@ module.exports = async (github, context) => {
|
||||
|
||||
// Look for Snack or a GH repo associated with the user that added an issue or comment
|
||||
const hasValidReproducer = entities.some(entity => {
|
||||
const hasPullRequestRepoLink = containsPattern(
|
||||
entity.body,
|
||||
`https?:\/\/github\.com\/facebook\/react-native\/pull\/\d+\/?`,
|
||||
);
|
||||
|
||||
const hasExpoSnackLink = containsPattern(
|
||||
entity.body,
|
||||
`https?:\\/\\/snack\\.expo\\.dev\\/[^\\s)\\]]+`,
|
||||
@@ -50,7 +55,7 @@ module.exports = async (github, context) => {
|
||||
entity.body,
|
||||
`https?:\\/\\/github\\.com\\/(${entity.user.login})\\/[^/]+\\/?\\s?`,
|
||||
);
|
||||
return hasExpoSnackLink || hasGithubRepoLink;
|
||||
return hasPullRequestRepoLink || hasExpoSnackLink || hasGithubRepoLink;
|
||||
});
|
||||
|
||||
if (hasValidReproducer) {
|
||||
|
||||
Reference in New Issue
Block a user