1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplify the condition expression to ignore commits

This commit is contained in:
Nobuyoshi Nakada 2022-04-16 16:45:46 +09:00
parent 492185e39c
commit b09e96341e
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -427,7 +427,7 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
files = IO.popen(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}") {|f|
f.readlines("\0", chomp: true)
}
subject =~ /^Merge/ || subject =~ /^Auto Merge/ || files.all?{|file| file =~ IGNORE_FILE_PATTERN}
subject.start_with?("Merge", "Auto Merge") or files.all?(IGNORE_FILE_PATTERN)
end
if commits.empty?