diff --git a/Dangerfile b/Dangerfile index ad3abc0bd09d..d439496653f9 100644 --- a/Dangerfile +++ b/Dangerfile @@ -11,7 +11,7 @@ android_release_checker.check_release_notes_and_play_store_strings android_strings_checker.check_strings_do_not_refer_resource -# skip remaining checks if we're during the release process +# skip remaining checks if we're in a release-process PR if github.pr_labels.include?('Releases') message('This PR has the `Releases` label: some checks will be skipped.') return @@ -30,8 +30,11 @@ pr_size_checker.check_diff_size( android_unit_test_checker.check_missing_tests -# skip remaining checks if we have a Draft PR -return if github.pr_draft? +# skip remaining checks if the PR is still a Draft +if github.pr_draft? + message('This PR is still a Draft: some checks will be skipped.') + return +end labels_checker.check( do_not_merge_labels: ['Do Not Merge'], @@ -39,5 +42,5 @@ labels_checker.check( required_labels_error: 'PR requires at least one label.' ) -# skip check for draft PRs and for WIP features unless the PR is against the main branch or release branch -milestone_checker.check_milestone_due_date(days_before_due: 4) unless github_utils.wip_feature? && !(github_utils.release_branch? || github_utils.main_branch?) +# runs the milestone check if this is not a WIP feature and the PR is against the main branch or the release branch +milestone_checker.check_milestone_due_date(days_before_due: 4) if (github_utils.main_branch? || github_utils.release_branch?) && !github_utils.wip_feature?