Merge pull request #7172 from bayandin/full_index-for_patch-diff

rubocops/patches: suggest url with full_index=1
This commit is contained in:
Mike McQuaid 2020-03-15 12:53:02 +00:00 committed by GitHub
commit b6d9b1aae6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ module RuboCop
if match_obj = regex_match_group(patch, gh_patch_diff_pattern)
problem <<~EOS
use GitHub pull request URLs:
https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_obj[3]}.patch
https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_obj[3]}.patch?full_index=1
Rather than patch-diff:
#{patch_url}
EOS

View File

@ -94,7 +94,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
[{ message:
<<~EOS,
use GitHub pull request URLs:
https://github.com/foo/foo-bar/pull/100.patch
https://github.com/foo/foo-bar/pull/100.patch?full_index=1
Rather than patch-diff:
https://patch-diff.githubusercontent.com/raw/foo/foo-bar/pull/100.patch
EOS
@ -231,7 +231,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
[{ message:
<<~EOS,
use GitHub pull request URLs:
https://github.com/foo/foo-bar/pull/100.patch
https://github.com/foo/foo-bar/pull/100.patch?full_index=1
Rather than patch-diff:
https://patch-diff.githubusercontent.com/raw/foo/foo-bar/pull/100.patch
EOS