Ignore test/regress/ for racc
This commit is contained in:
parent
94275d96a8
commit
f5da7c379b
@ -424,26 +424,43 @@ module SyncDefaultGems
|
|||||||
replace_rdoc_ref_all
|
replace_rdoc_ref_all
|
||||||
end
|
end
|
||||||
|
|
||||||
IGNORE_FILE_PATTERN =
|
def ignore_file_pattern_for(gem)
|
||||||
/\A(?:[A-Z]\w*\.(?:md|txt)
|
patterns = []
|
||||||
|[^\/]+\.yml
|
|
||||||
|\.git.*
|
|
||||||
|[A-Z]\w+file
|
|
||||||
|COPYING
|
|
||||||
|Gemfile.lock
|
|
||||||
|bin\/.*
|
|
||||||
|rakelib\/.*
|
|
||||||
|test\/lib\/.*
|
|
||||||
)\z/mx
|
|
||||||
|
|
||||||
YARP_IGNORE_FILE_PATTERN =
|
# Common patterns
|
||||||
/\A(?:Makefile\.in
|
patterns << %r[\A(?:
|
||||||
|configure\.ac
|
[A-Z]\w*\.(?:md|txt)
|
||||||
|fuzz\/.*
|
|[^/]+\.yml
|
||||||
|rust\/.*
|
|\.git.*
|
||||||
|tasks\/.*
|
|[A-Z]\w+file
|
||||||
|ext\/yarp\/extconf\.rb
|
|COPYING
|
||||||
)\z/mx
|
|Gemfile.lock
|
||||||
|
|bin/.*
|
||||||
|
|rakelib/.*
|
||||||
|
|test/lib/.*
|
||||||
|
)\z]mx
|
||||||
|
|
||||||
|
# Gem-specific patterns
|
||||||
|
case gem
|
||||||
|
when "racc"
|
||||||
|
%r[\A(?:
|
||||||
|
test/regress/.*
|
||||||
|
)\z]mx
|
||||||
|
when "yarp"
|
||||||
|
%r[\A(?:
|
||||||
|
Makefile\.in
|
||||||
|
|configure\.ac
|
||||||
|
|fuzz/.*
|
||||||
|
|rust/.*
|
||||||
|
|tasks/.*
|
||||||
|
|ext/yarp/extconf\.rb
|
||||||
|
)\z]mx
|
||||||
|
end&.tap do |pattern|
|
||||||
|
patterns << pattern
|
||||||
|
end
|
||||||
|
|
||||||
|
Regexp.union(*patterns)
|
||||||
|
end
|
||||||
|
|
||||||
def message_filter(repo, sha, input: ARGF)
|
def message_filter(repo, sha, input: ARGF)
|
||||||
log = input.read
|
log = input.read
|
||||||
@ -515,10 +532,7 @@ module SyncDefaultGems
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Ignore Merge commits and already-merged commits.
|
# Ignore Merge commits and already-merged commits.
|
||||||
ignore_file_pattern = IGNORE_FILE_PATTERN
|
ignore_file_pattern = ignore_file_pattern_for(gem)
|
||||||
if gem == "yarp"
|
|
||||||
ignore_file_pattern = Regexp.union(ignore_file_pattern, YARP_IGNORE_FILE_PATTERN)
|
|
||||||
end
|
|
||||||
commits.delete_if do |sha, subject|
|
commits.delete_if do |sha, subject|
|
||||||
files = pipe_readlines(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}")
|
files = pipe_readlines(%W"git diff-tree -z --no-commit-id --name-only -r #{sha}")
|
||||||
subject.start_with?("Merge", "Auto Merge") or files.all?(ignore_file_pattern)
|
subject.start_with?("Merge", "Auto Merge") or files.all?(ignore_file_pattern)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user