diff --git a/src/plugins/github/token.js b/src/plugins/github/token.js index b533553..4177035 100644 --- a/src/plugins/github/token.js +++ b/src/plugins/github/token.js @@ -30,7 +30,7 @@ export function validateToken(token: string) { ); } - if (hexCode.length != 16) { + if (hexCode.length != 40) { console.warn( `Warning: GitHub installation access token has an unexpected hexadecimal component ` + `length of ${hexCode.length}.` diff --git a/src/plugins/github/token.test.js b/src/plugins/github/token.test.js index 786d77e..a5df65a 100644 --- a/src/plugins/github/token.test.js +++ b/src/plugins/github/token.test.js @@ -59,7 +59,7 @@ describe("plugins/github/token", () => { it("should accept an installation access token format", () => { // Given - const token = "v1.1bfb713d900c4962"; + const token = "v1.1bfb713d900c49621bfb713d900c49621bfb713d"; // When validateToken(token); @@ -70,7 +70,7 @@ describe("plugins/github/token", () => { it("should warn when installation access token has an unexpected version", () => { // Given - const token = "v5.1bfb713d900c4962"; + const token = "v5.1bfb713d900c49621bfb713d900c49621bfb713d"; // When validateToken(token);