diff --git a/Dangerfile b/Dangerfile index 4912e9a3..119b660f 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,13 +1,12 @@ # frozen_string_literal: true # Skip Danger run if the opened pull request has "wip" label, [WIP] in the title, or status is Draft -has_wip_label = github.pr_labels.any? { |label| label.include? 'wip' } -has_wip_title = github.pr_title.include? '[WIP]' +has_wip_label = github.pr_labels.any? { |label| label.downcase.include? 'wip' } +has_wip_title = github.pr_title.downcase.include? '[wip]' is_draft = github.pr_draft? if has_wip_label || has_wip_title || is_draft - message('Skipping Danger since PR is classed as Work in Progress') - return + return message('Skipping Danger since PR is classed as Work in Progress') end # Runs Rubocop and submit comments on modified and added files