From a5de91064a2cf05855b0158ebece5e7819e3b840 Mon Sep 17 00:00:00 2001 From: jan-wi <82671095+jan-wi@users.noreply.github.com> Date: Fri, 16 Apr 2021 19:00:54 +0200 Subject: [PATCH] Fixes #3512 - allow http for local gitlab or github enterprise instance --- lib/github/linked_issue.rb | 2 +- lib/gitlab/linked_issue.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github/linked_issue.rb b/lib/github/linked_issue.rb index 72b9e6517..b3a212096 100644 --- a/lib/github/linked_issue.rb +++ b/lib/github/linked_issue.rb @@ -97,7 +97,7 @@ class GitHub end def variables!(url) - if url !~ %r{^https://([^/]+)/([^/]+)/([^/]+)/issues/(\d+)$} + if url !~ %r{^https?://([^/]+)/([^/]+)/([^/]+)/issues/(\d+)$} raise Exceptions::UnprocessableEntity, 'Invalid GitHub issue link format' end diff --git a/lib/gitlab/linked_issue.rb b/lib/gitlab/linked_issue.rb index 144f7cfd9..4d05a293a 100644 --- a/lib/gitlab/linked_issue.rb +++ b/lib/gitlab/linked_issue.rb @@ -97,7 +97,7 @@ class GitLab end def variables(url) - if url !~ %r{^https://([^/]+)/(.*)/-/issues/(\d+)$} + if url !~ %r{^https?://([^/]+)/(.*)/-/issues/(\d+)$} raise Exceptions::UnprocessableEntity, 'Invalid GitLab issue link format' end