From 7261d927fbada621f4777d32a8b884c549c43efa Mon Sep 17 00:00:00 2001 From: Gabriele Mambrini Date: Wed, 15 Dec 2021 00:57:13 +0100 Subject: [PATCH] fix: report busy status for offline workers (#1009) ref #911 Fix #993 cannot work because the runner busy status is not reported when offline --- github/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/github.go b/github/github.go index c3ae2f68..dc95f6fb 100644 --- a/github/github.go +++ b/github/github.go @@ -337,7 +337,7 @@ func (r *Client) IsRunnerBusy(ctx context.Context, enterprise, org, repo, name s for _, runner := range runners { if runner.GetName() == name { if runner.GetStatus() == "offline" { - return false, &RunnerOffline{runnerName: name} + return runner.GetBusy(), &RunnerOffline{runnerName: name} } return runner.GetBusy(), nil }