From df99f394b463c0fca66cc3dee9977fa7fad1ad71 Mon Sep 17 00:00:00 2001 From: ZacharyBenamram Date: Sun, 29 Nov 2020 16:03:27 -0800 Subject: [PATCH] Remove 10 minute buffer to token expiration (#214) Co-authored-by: Zachary Benamram --- github/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/github.go b/github/github.go index 0d4b7563..7ffc5890 100644 --- a/github/github.go +++ b/github/github.go @@ -84,7 +84,7 @@ func (c *Client) GetRegistrationToken(ctx context.Context, org, repo, name strin key := getRegistrationKey(org, repo) rt, ok := c.regTokens[key] - if ok && rt.GetExpiresAt().After(time.Now().Add(-10*time.Minute)) { + if ok && rt.GetExpiresAt().After(time.Now()) { return rt, nil }