mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-20 14:45:05 +00:00
[MIRROR] Add whitelist to webhook processor PR tagging [MDB IGNORE] (#21749)
* Add whitelist to webhook processor PR tagging (#75943) I hate this script. Actions my beloved... This is to get it away from my beautiful tgstation-server garden. Fixes https://github.com/tgstation/tgstation-server/issues/1520 * Add whitelist to webhook processor PR tagging --------- Co-authored-by: Jordan Dominion <Cyberboss@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,8 @@ define('F_SECRET_PR', 1<<1);
|
||||
|
||||
$hookSecret = '08ajh0qj93209qj90jfq932j32r';
|
||||
$apiKey = '209ab8d879c0f987d06a09b9d879c0f987d06a09b9d8787d0a089c';
|
||||
$repoOwnerAndName = "tgstation/tgstation";
|
||||
$repoOwnerAndName = "tgstation/tgstation"; // this is just the repository auto-updates happen from
|
||||
$repoAutoTaggerWhitelist = array("tgstation", "TerraGov-Marine-Corps");
|
||||
$servers = array();
|
||||
$enable_live_tracking = true;
|
||||
$path_to_script = 'tools/WebhookProcessor/github_webhook_processor.php';
|
||||
@@ -212,6 +213,11 @@ function check_tag_and_replace($payload, $title_tag, $label, &$array_to_add_labe
|
||||
}
|
||||
|
||||
function set_labels($payload, $labels, $remove) {
|
||||
global $repoAutoTaggerWhitelist;
|
||||
if(!in_array($repoAutoTaggerWhitelist, $payload['repository']['name'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$existing = get_labels($payload);
|
||||
$tags = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user