From 97269f8cd18837e06aeb66dbd464c7cd885cde76 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 12 Jul 2017 00:14:57 -0500 Subject: [PATCH] Prevents github bot from removing Sprites and Sound labels (#1978) --- 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 63464d8088..d73970f04b 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)