From aed5400f20865ee7ae916e3283597c9a56577778 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Wed, 17 Mar 2021 18:50:49 +0000 Subject: [PATCH] Log when a key is _not_ used as a deploy key Resolves #69. Co-authored-by: Sean Killeen --- dist/index.js | 2 ++ index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 883d7c7..6dbf026 100644 --- a/dist/index.js +++ b/dist/index.js @@ -170,6 +170,8 @@ try { const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i); if (!parts) { + console.log(`Comment for key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`); + return; } diff --git a/index.js b/index.js index 6c8d969..1a4835e 100644 --- a/index.js +++ b/index.js @@ -53,6 +53,8 @@ try { const parts = key.match(/\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+)/i); if (!parts) { + console.log(`Comment for key '${key}' does not match GitHub URL pattern. Not treating it as a GitHub deploy key.`); + return; }