github: fix rate limiting

Michael Muré created

It seems like the error message that github return changed.

Change summary

bridge/github/client.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Detailed changes

bridge/github/client.go 🔗

@@ -130,7 +130,8 @@ func (c *rateLimitHandlerClient) callAPIDealWithLimit(ctx context.Context, apiCa
 		return nil
 	}
 	// matching the error string
-	if strings.Contains(err.Error(), "API rate limit exceeded") {
+	if strings.Contains(err.Error(), "API rate limit exceeded") ||
+		strings.Contains(err.Error(), "was submitted too quickly") {
 		// a rate limit error
 		qctx, cancel = context.WithTimeout(ctx, defaultTimeout)
 		defer cancel()