From 5973fdd987e3930437bebd5c84a626aaa05b2e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 2 Aug 2023 11:44:12 +0200 Subject: [PATCH] Allow dots in branch name --- app/responders/repo_checks_responder.rb | 2 +- spec/responders/repo_checks_responder_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/responders/repo_checks_responder.rb b/app/responders/repo_checks_responder.rb index 56ce8300..0909d4e7 100644 --- a/app/responders/repo_checks_responder.rb +++ b/app/responders/repo_checks_responder.rb @@ -6,7 +6,7 @@ class RepoChecksResponder < Responder def define_listening @event_action = "issue_comment.created" - @event_regex = /\A@#{bot_name} check repository(?: from branch ([\/\w-]+))?\.?\s*$/i + @event_regex = /\A@#{bot_name} check repository(?: from branch ([\/\.\w-]+))?\.?\s*$/i end def process_message(message) diff --git a/spec/responders/repo_checks_responder_spec.rb b/spec/responders/repo_checks_responder_spec.rb index 051e69dc..5b3435f4 100644 --- a/spec/responders/repo_checks_responder_spec.rb +++ b/spec/responders/repo_checks_responder_spec.rb @@ -20,7 +20,7 @@ expect(@responder.event_regex).to match("@botsci check repository") expect(@responder.event_regex).to match("@botsci check repository \r\n") expect(@responder.event_regex).to match("@botsci check repository\r\nmore") - expect(@responder.event_regex).to match("@botsci check repository from branch custom-branch") + expect(@responder.event_regex).to match("@botsci check repository from branch custom-branch_6.0") expect(@responder.event_regex).to match("@botsci check repository from branch custom/branch") expect(@responder.event_regex).to match("@botsci check repository from branch development \r\n") expect(@responder.event_regex).to_not match("@botsci check repository from branch ")