whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Fix up link checks
Date Tue, 03 Jul 2018 08:40:02 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a107b1  Fix up link checks
6a107b1 is described below

commit 6a107b12b34525c61391676d90b70254d1f976fb
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Jul 3 09:40:00 2018 +0100

    Fix up link checks
---
 www/project/icla/views/pages/invite.js.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/www/project/icla/views/pages/invite.js.rb b/www/project/icla/views/pages/invite.js.rb
index a197bca..09494d6 100644
--- a/www/project/icla/views/pages/invite.js.rb
+++ b/www/project/icla/views/pages/invite.js.rb
@@ -502,12 +502,12 @@ def setIclaName(event)
     document.getElementById('votelink').setCustomValidity('');
     if (@votelink)
       # verify that the link refers to lists.apache.org message on the project list
-      if not @votelink=~ /.*lists\.apache\.org.*/
+      if not @votelink=~ /^https:\/\/lists\.apache\.org\//
         @voteErrorMessage = "Error: Please link to\
-        a message via lists.apache.org"
+        a message via https://lists.apache.org/"
         @showVoteErrorMessage = true;
       end
-      if not @votelink=~ /.*private\.#{@mail_list}(\.incubator)?\.apache\.org.*/
+      if not @votelink=~ /private@#{@mail_list}(\.incubator)?\.apache\.org/
         @voteErrorMessage = "Error: Please link to\
         the [RESULT][VOTE] message sent to the private list."
         @showVoteErrorMessage = true;
@@ -529,17 +529,17 @@ def setIclaName(event)
     document.getElementById('noticelink').setCustomValidity('');
     # verify that the link refers to lists.apache.org message on the proper list
     if (@noticelink)
-      if not @noticelink=~ /.*lists\.apache\.org.*/
+      if not @noticelink=~ /^https:\/\/lists\.apache\.org\//
         @noticeErrorMessage = "Error: please link to\
-        a message via lists.apache.org"
+        a message via https://lists.apache.org/"
         @showNoticeErrorMessage = true;
       end
-      if @showPMCNoticeLink and not @noticelink=~ /.*board\.apache\.org.*/
+      if @showPMCNoticeLink and not @noticelink=~ /board@apache\.org/
         @noticeErrorMessage = "Error: please link to\
         the NOTICE message sent to the board list."
         @showNoticeErrorMessage = true;
       end
-      if @showPPMCNoticeLink and not @noticelink=~ /.*private\@incubator\.apache\.org.*/
+      if @showPPMCNoticeLink and not @noticelink=~ /private@incubator\.apache\.org/
         @noticeErrorMessage = "Error: please link to\
         the NOTICE message sent to the incubator private list."
         @showNoticeErrorMessage = true;


Mime
View raw message