Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#223] Ignore Danger run on WIP pull request #432

Merged
merged 7 commits into from
Jul 17, 2023
10 changes: 10 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 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.downcase.include? 'wip' }
sanG-github marked this conversation as resolved.
Show resolved Hide resolved
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
malparty marked this conversation as resolved.
Show resolved Hide resolved
end

# Runs Rubocop and submit comments on modified and added files
rubocop.lint(inline_comment: true, force_exclusion: true)

Expand Down