Skip to content

Commit e968094

Browse files
committed
GITHUB_RUNNING to IS_GITHUB_ACTIONS_RUNNING rename
1 parent fb9043c commit e968094

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,14 +607,14 @@ private function sendRawRequest(string $host, int $port, string $rawRequest)
607607
* @param ?string $preferredHost If passed, it will prefer this host over any of the configured ones. This does not
608608
* ensure it will use that host, but it will try to use it if its not blacklisted.
609609
*
610-
* @suppress PhanUndeclaredConstant - suppresses GITHUB_RUNNING
610+
* @suppress PhanUndeclaredConstant - suppresses IS_GITHUB_ACTIONS_RUNNING
611611
*/
612612
private function getPossibleHosts(?string $preferredHost, bool $resetHosts = false)
613613
{
614614
// We get the host configs from the APC cache. Then, we check the configuration there with the passed
615615
// configuration and if it's outdated (ie: it has different hosts from the one in the config), we reset it. This
616616
// is so that we don't keep the old cache after changing the hosts or failover configuration.
617-
if (!defined('GITHUB_RUNNING') || !GITHUB_RUNNING) {
617+
if (!defined('IS_GITHUB_ACTIONS_RUNNING') || !IS_GITHUB_ACTIONS_RUNNING) {
618618
$apcuKey = self::APCU_CACHE_PREFIX.$this->clusterName;
619619
if ($resetHosts) {
620620
$this->logger->info('Bedrock\Client - Resetting host configs');
@@ -838,12 +838,12 @@ private static function toUTF8($str)
838838
* configuration.
839839
* We also close and clear the socket from the cache, so we don't reuse it.
840840
*
841-
* @suppress PhanUndeclaredConstant - suppresses GITHUB_RUNNING
841+
* @suppress PhanUndeclaredConstant - suppresses IS_GITHUB_ACTIONS_RUNNING
842842
*/
843843
private function markHostAsFailed(string $host)
844844
{
845845
$blacklistedUntil = time() + rand(1, $this->maxBlackListTimeout);
846-
if (!defined('GITHUB_RUNNING') || !GITHUB_RUNNING) {
846+
if (!defined('IS_GITHUB_ACTIONS_RUNNING') || !IS_GITHUB_ACTIONS_RUNNING) {
847847
$apcuKey = self::APCU_CACHE_PREFIX.$this->clusterName;
848848
$hostConfigs = apcu_fetch($apcuKey);
849849
$hostConfigs[$host]['blacklistedUntil'] = $blacklistedUntil;

0 commit comments

Comments
 (0)