Index: trunk/extensions/CodeReview/CodeReleaseNotes.php |
— | — | @@ -100,6 +100,7 @@ |
101 | 101 | $wgOut->addHTML( '</ul>' ); |
102 | 102 | } |
103 | 103 | |
| 104 | + // Quick relevance tests (these *should* be over-inclusive a little if anything) |
104 | 105 | private function isRelevant( $summary ) { |
105 | 106 | # Fixed a bug? |
106 | 107 | if( preg_match( '/\bbug #?(\d+)\b/i', $summary, $m ) ) |
— | — | @@ -108,13 +109,13 @@ |
109 | 110 | if( preg_match( '/\b\$wg[a-bA-Z]{3,100}\b/', $summary, $m ) ) |
110 | 111 | return true; |
111 | 112 | # Sanity check: summary cannot be *too* short to be useful |
112 | | - if( mb_strlen($summary) < 40 ) |
| 113 | + if( mb_strlen($summary) < 40 || str_word_count($summary) <= 5 ) |
113 | 114 | return false; |
114 | 115 | # All caps words? like "BREAKING CHANGE" |
115 | 116 | if( preg_match( '/\b[A-Z]{8,20}\b/', $summary, $m ) ) |
116 | 117 | return true; |
117 | 118 | # Longish summary :) |
118 | | - if( mb_strlen($summary) > 250 ) |
| 119 | + if( str_word_count($summary) > 35 ) |
119 | 120 | return true; |
120 | 121 | # Otherwise false |
121 | 122 | return false; |