lib/jira/plugin.rb in danger-jira-0.5.0 vs lib/jira/plugin.rb in danger-jira-0.5.1

- old
+ new

@@ -39,11 +39,11 @@ # def check(key: nil, url: nil, emoji: ":link:", search_title: true, search_commits: false, fail_on_warning: false, report_missing: true, skippable: true) throw Error("'key' missing - must supply JIRA issue key") if key.nil? throw Error("'url' missing - must supply JIRA installation URL") if url.nil? - return if skippable && should_skip_jira? + return if skippable && should_skip_jira?(search_title: search_title) jira_issues = find_jira_issues( key: key, search_title: search_title, search_commits: search_commits @@ -92,24 +92,16 @@ end end return jira_issues.uniq end - def should_skip_jira?(search_title: true, search_commits: false) + def should_skip_jira?(search_title: true) # Consider first occurrence of 'no-jira' regexp = Regexp.new("no-jira", true) if search_title github.pr_title.gsub(regexp) do |match| return true unless match.empty? - end - end - - if search_commits - git.commits.map do |commit| - commit.message.gsub(regexp) do |match| - return true unless match.empty? - end end end github.pr_body.gsub(regexp) do |match| return true unless match.empty?