lib/jira/plugin.rb in danger-jira-0.2.0 vs lib/jira/plugin.rb in danger-jira-0.3.0

- old
+ new

@@ -37,9 +37,15 @@ jira_issues = [] github.pr_title.gsub(regexp) do |match| jira_issues << match end + if jira_issues.empty? + github.pr_body.gsub(regexp) do |match| + jira_issues << match + end + end + if !jira_issues.empty? jira_urls = jira_issues.map { |issue| link(href: ensure_url_ends_with_slash(url), issue: issue) }.join(", ") message("#{emoji} #{jira_urls}") else msg = "This PR does not contain a JIRA issue key in the PR title (e.g. KEY-123)"