From 955791ae99b444763945362832284c82181a6e15 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 6 Jul 2017 14:06:16 -0400 Subject: [PATCH] Prevents github bot from removing Sprites and Sound labels --- tools/github_webhook_processor.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/github_webhook_processor.php b/tools/github_webhook_processor.php index 50fe614937e..488828c9824 100644 --- a/tools/github_webhook_processor.php +++ b/tools/github_webhook_processor.php @@ -150,12 +150,16 @@ function tag_pr($payload, $opened) { else if ($mergable === FALSE) $tags[] = 'Merge Conflict'; - $treetags = array('_maps' => 'Map Edit', 'tools' => 'Tools', 'SQL' => 'SQL', 'icons' => 'Sprites', 'sounds' => 'Sound'); + $treetags = array('_maps' => 'Map Edit', 'tools' => 'Tools', 'SQL' => 'SQL'); + $addonlytags = array('icons' => 'Sprites', 'sounds' => 'Sound'); foreach($treetags as $tree => $tag) if(has_tree_been_edited($payload, $tree)) $tags[] = $tag; else $remove[] = $tag; + foreach($addonlytags as $tree => $tag) + if(has_tree_been_edited($payload, $tree)) + $tags[] = $tag; //only maintners should be able to remove these if(strpos($title, '[DNM]') !== FALSE)