PR bot improvements (#26100)

* Marks PRs that close issues as fixes

* Autotag edits to the Administration tree

* Fixes server spam!!!

* Right

* Revert "Autotag edits to the Administration tree"

This reverts commit 0a9c680e283a9edbcae5159d9056a0eaaf3ce145.
This commit is contained in:
Cyberboss
2017-04-12 14:05:50 -04:00
committed by AnturK
parent de35ec5f67
commit abb1dadbdf

View File

@@ -194,7 +194,7 @@ function handle_pr($payload) {
case 'edited':
case 'synchronize':
tag_pr($payload, false);
break;
return;
case 'reopened':
$action = $payload['action'];
break;
@@ -241,14 +241,20 @@ function checkchangelog($payload, $merge = false, $compile = true) {
return;
}
$body = $payload['pull_request']['body'];
$tags = array();
if(preg_match('/(?i)(fix|fixes|fixed|resolve|resolves|resolved)\s*#[0-9]+/',$body)) //github autoclose syntax
$tags[] = 'Fix';
$body = str_replace("\r\n", "\n", $body);
$body = explode("\n", $body);
$username = $payload['pull_request']['user']['login'];
$incltag = false;
$changelogbody = array();
$currentchangelogblock = array();
$foundcltag = false;
$tags = array();
foreach ($body as $line) {
$line = trim($line);
if (substr($line,0,4) == ':cl:' || substr($line,0,4) == '🆑') {