@@ -698,15 +698,18 @@ if File.file?(failsafe_report)
698
698
end
699
699
end
700
700
701
- if github . pr_body !~ /Addressed to #\d +/
701
+ # Don't show some warnings/messages to a bot, it doesn't read them
702
+ prFromRealUser = github . pr_author != 'dependabot'
703
+
704
+ if prFromRealUser && github . pr_body !~ /Addressed to #\d +/
702
705
warn (
703
706
"danger check: pull request description doesn't contain a link to original issue.\n " \
704
707
"Consider adding a comment in the following format: `Addressed to #XXX` where `XXX` is an issue number"
705
708
)
706
709
end
707
710
708
711
commits = git . commits . size
709
- if commits > 1
712
+ if prFromRealUser && commits > 1
710
713
if git . commits . any? { |c | c . message =~ /^Merge branch/ || c . message =~ /^Merge remote-tracking branch/ }
711
714
fail (
712
715
"danger check: pull request contains merge commits! " \
@@ -722,7 +725,7 @@ if commits > 1
722
725
end
723
726
end
724
727
725
- if github . branch_for_head !~ /^gh[0-9]+_/
728
+ if prFromRealUser && github . branch_for_head !~ /^gh[0-9]+_/
726
729
warn ( "danger check: branch `#{ github . branch_for_head } ` does not comply with our best practices. " \
727
730
"Branch name should use the following scheme: `ghXXX_meaningful-name` where `XXX` is an issue number. " \
728
731
"**Next time**, please, use this scheme :)"
@@ -738,7 +741,7 @@ if modified_resources && !updated_url
738
741
end
739
742
740
743
all_checks_passed = violation_report [ :errors ] . empty? && violation_report [ :warnings ] . empty? && violation_report [ :messages ] . empty?
741
- if all_checks_passed
744
+ if prFromRealUser && all_checks_passed
742
745
message (
743
746
"@#{ github . pr_author } thank you for the PR! All quality checks have been passed! " \
744
747
"Next step is to wait when @php-coder will review this code"
0 commit comments