Skip to content

Commit 4c73fb8

Browse files
committed
more
1 parent a945605 commit 4c73fb8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/connector/helpers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ func extractRateLimitData(response *github.Response) (*v2.RateLimitDescription,
170170
ra = &timestamppb.Timestamp{Seconds: ts}
171171
}
172172

173+
status := v2.RateLimitDescription_STATUS_OK
174+
if r <= 0 {
175+
status = v2.RateLimitDescription_STATUS_OVERLIMIT
176+
}
173177
return &v2.RateLimitDescription{
178+
Status: status,
174179
Limit: l,
175180
Remaining: r,
176181
ResetAt: ra,

0 commit comments

Comments
 (0)