|
189 | 189 |
|
190 | 190 | # Owner metadata key in package.json |
191 | 191 | /frontend/javascripts/packages/my_other_package/**/** @MyOrg/bar-team |
| 192 | +
|
| 193 | + # Team YML ownership |
| 194 | + /config/teams/bar.yml @MyOrg/bar-team |
192 | 195 | EXPECTED |
193 | 196 | end |
194 | 197 |
|
|
220 | 223 |
|
221 | 224 | # Owner metadata key in package.json |
222 | 225 | /frontend/javascripts/packages/my_other_package/**/** @MyOrg/bar-team |
| 226 | +
|
| 227 | + # Team YML ownership |
| 228 | + /config/teams/bar.yml @MyOrg/bar-team |
223 | 229 | EXPECTED |
224 | 230 | end |
225 | 231 | end |
|
428 | 434 |
|
429 | 435 | # Owner metadata key in package.json |
430 | 436 | /frontend/javascripts/packages/my_other_package/**/** @MyOrg/bar-team |
| 437 | +
|
| 438 | + # Team YML ownership |
| 439 | + /config/teams/bar.yml @MyOrg/bar-team |
431 | 440 | CODEOWNERS |
432 | 441 |
|
433 | 442 | expect_any_instance_of(codeowners_validation).to_not receive(:`) # rubocop:disable RSpec/AnyInstance |
|
486 | 495 | # Owner metadata key in package.json |
487 | 496 | /frontend/javascripts/packages/my_other_package/**/** @MyOrg/bar-team |
488 | 497 |
|
| 498 | + # Team YML ownership |
| 499 | + /config/teams/bar.yml @MyOrg/bar-team |
489 | 500 | CODEOWNERS |
490 | 501 |
|
491 | 502 | expect_any_instance_of(codeowners_validation).to_not receive(:`) # rubocop:disable RSpec/AnyInstance |
|
530 | 541 | # Owner metadata key in package.json |
531 | 542 | /frontend/javascripts/packages/my_other_package/**/** @MyOrg/bar-team |
532 | 543 |
|
| 544 | + # Team YML ownership |
| 545 | + /config/teams/bar.yml @MyOrg/bar-team |
533 | 546 | CODEOWNERS |
534 | 547 |
|
535 | 548 | expect_any_instance_of(codeowners_validation).to_not receive(:`) # rubocop:disable RSpec/AnyInstance |
|
736 | 749 | expect(CodeOwnership.for_file('frontend/javascripts/packages/my_other_package/my_file.jsx')).to eq CodeTeams.find('Bar') |
737 | 750 | end |
738 | 751 |
|
| 752 | + it 'maps a team YML to be owned by the team itself' do |
| 753 | + expect(CodeOwnership.for_file('config/teams/bar.yml')).to eq CodeTeams.find('Bar') |
| 754 | + end |
| 755 | + |
739 | 756 | describe 'path formatting expectations' do |
740 | 757 | # All file paths must be clean paths relative to the root: https://apidock.com/ruby/Pathname/cleanpath |
741 | 758 | it 'will not find the ownership of a file that is not a cleanpath' do |
|
996 | 1013 |
|
997 | 1014 | ## Owner metadata key in package.json |
998 | 1015 | - frontend/javascripts/packages/my_other_package/**/** |
| 1016 | +
|
| 1017 | + ## Team YML ownership |
| 1018 | + - config/teams/bar.yml |
999 | 1019 | OWNERSHIP |
1000 | 1020 | end |
1001 | 1021 |
|
|
1024 | 1044 |
|
1025 | 1045 | ## Owner metadata key in package.json |
1026 | 1046 | This team owns nothing in this category. |
| 1047 | +
|
| 1048 | + ## Team YML ownership |
| 1049 | + - config/teams/foo.yml |
1027 | 1050 | OWNERSHIP |
1028 | 1051 | end |
1029 | 1052 | end |
|
0 commit comments