@@ -15,41 +15,6 @@ const minimatch = require('minimatch');
15
15
16
16
import { danger , fail , markdown , message , warn } from 'danger' ;
17
17
18
- const isDocsFile = path => includes ( path , 'docs/' ) ;
19
- const editsDocs = danger . git . modified_files . filter ( isDocsFile ) . length > 0 ;
20
- const addsDocs = danger . git . created_files . filter ( isDocsFile ) . length > 0 ;
21
- if ( addsDocs || editsDocs ) {
22
- // Note, this does not yet cover edits to the autogenerated docs
23
- // (e.g. comments within JS source files)
24
- const title = ':page_facing_up: Docs' ;
25
- const idea = 'Thanks for your contribution to the docs!' ;
26
- message ( `${ title } - <i>${ idea } </i>` ) ;
27
-
28
- // Add the Documentation label via bot, as @facebook-open-source-bot does not have write privileges on the repo.
29
- markdown ( '@facebook-github-bot label Documentation' ) ;
30
- }
31
-
32
- const isBlogFile = path => includes ( path , 'blog/' ) ;
33
-
34
- // Flags new blog posts. Note that mentions will not be parsed as the access token we're using does
35
- // not belong to the Facebook org (on purpose)
36
- const addsBlogPost = danger . git . created_files . filter ( isBlogFile ) . length > 0 ;
37
- if ( addsBlogPost ) {
38
- const title = ':memo: Blog post' ;
39
- const idea = 'This PR appears to add a new blog post, ' +
40
- 'and may require further review from the React Native team.' ;
41
- warn ( `${ title } - <i>${ idea } </i>` ) ;
42
- }
43
-
44
- // Flags edits to blog posts
45
- const editsBlogPost = danger . git . modified_files . filter ( isBlogFile ) . length > 0 ;
46
- if ( editsBlogPost ) {
47
- const title = ':memo: Blog post' ;
48
- const idea = 'This PR appears to edit an existing blog post, ' +
49
- 'and may require further review from the React Native team.' ;
50
- warn ( `${ title } - <i>${ idea } </i>` ) ;
51
- }
52
-
53
18
// Fails if the description is too short.
54
19
if ( ! danger . github . pr . body || danger . github . pr . body . length < 10 ) {
55
20
fail ( ':grey_question: This pull request needs a description.' ) ;
@@ -74,19 +39,8 @@ if (packageChanged) {
74
39
}
75
40
76
41
// Warns if a test plan is missing.
77
- const gettingStartedChanged = includes ( danger . git . modified_files , 'docs/GettingStarted.md' ) ;
78
42
const includesTestPlan = danger . github . pr . body && danger . github . pr . body . toLowerCase ( ) . includes ( 'test plan' ) ;
79
-
80
- // Warns if a test plan is missing, when editing the Getting Started guide. This page needs to be
81
- // tested in all its permutations.
82
- if ( ! includesTestPlan && gettingStartedChanged ) {
83
- const title = ':clipboard: Test Plan' ;
84
- const idea = 'This PR appears to be missing a Test Plan.' ;
85
- warn ( `${ title } - <i>${ idea } </i>` ) ;
86
- markdown ( '@facebook-github-bot label Needs more information' ) ;
87
- }
88
- // Doc edits rarely require a test plan. We'll trust the reviewer to push back if one is needed.
89
- if ( ! includesTestPlan && ! editsDocs ) {
43
+ if ( ! includesTestPlan ) {
90
44
const title = ':clipboard: Test Plan' ;
91
45
const idea = 'This PR appears to be missing a Test Plan.' ;
92
46
warn ( `${ title } - <i>${ idea } </i>` ) ;
0 commit comments