mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-03 21:42:06 +00:00
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:
@@ -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) == '🆑') {
|
||||
|
||||
Reference in New Issue
Block a user