From a32cfde51c3cea99855a91b952db4bc06e48c020 Mon Sep 17 00:00:00 2001 From: Gudmundur Haraldsson Date: Mon, 21 Sep 2020 13:26:06 +0000 Subject: [PATCH] Make GitHub base URL configurable --- defines.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/defines.php b/defines.php index 3d8dfd0ab..4e7133ce7 100644 --- a/defines.php +++ b/defines.php @@ -15,7 +15,10 @@ define( 'VIPGOCI_GITHUB_ERROR_STR', 'GitHub API communication error. ' . 'Please contact a human.' ); -define( 'VIPGOCI_GITHUB_BASE_URL', 'https://api.github.com' ); +/* Define if not defined. Unit-tests can define this for testing. */ +if ( ! defined( 'VIPGOCI_GITHUB_BASE_URL' ) ) { + define( 'VIPGOCI_GITHUB_BASE_URL', 'https://api.github.com' ); +} define( 'VIPGOCI_INFORMATIONAL_MESSAGE', 'This bot provides automated ' .