danger-missing_codeowners 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87deed89b9d5702658d37e55cc22c2b804142e2b4bbd6dafbcd22c9c95ff510d
4
- data.tar.gz: 3203574f2c27a67f36df38f5bf76b25da7e9cf40ad4bc12814142c1764b85147
3
+ metadata.gz: 8d13b891d9d0d127146fdcce5e71490ece5feb8ea2d0c9bcfb6bddcd44f83f80
4
+ data.tar.gz: f9e6c3ecddc3e1941cfcc12550d3c064fd5af29058eaf726eadeecbcb07238aa
5
5
  SHA512:
6
- metadata.gz: 5779738fd0b9dab10a70df0cf498eedfdb2cc9e0f6be22cb33edbfc7c11461b3b7d00ddbc803dc4f482fdad54c38a87e5f02abe1fec2c047bfbf32240034e673
7
- data.tar.gz: 77a436294408c61cac890c5f466519a2e3719867a63919b834375fc9faac07f5183d9a536aaedd5e623ee59680f8a78e410445813e14536b089d51dd1f8e9a92
6
+ metadata.gz: 66f7283e8e7997bec66ecfbfa1ce6a19ce19c5e784c900996504e1880df45e0eadbe4c43a85c7976de76bf8ae429b2d7ae63d262bba5debcdfec948e9f157ddb
7
+ data.tar.gz: 9f7d00160a6b909e7d0ab2be5e0f29c30b0ecef12a4de87db2ede4c1e7cc98ce82aa5d45c61af29ac141ff4f25d7e6241eee2ee4fad8255801d96e197458f506
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MissingCodeowners
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -111,6 +111,14 @@ module Danger
111
111
  raise "[ERROR] Invalid CODEOWNERS line: '#{line}'"
112
112
  else
113
113
  pattern = components[0]
114
+
115
+ # There is a different between .gitignore spec and CODEOWNERS in regards to nested directories
116
+ # See frotz/ example in https://git-scm.com/docs/gitignore
117
+ # foo/bar (CODEOWNERS) == **/foo/bar (.gitignore)
118
+ if pattern.match(%r{^[^/*].*/.+})
119
+ pattern = "**/#{pattern}"
120
+ end
121
+
114
122
  patterns << pattern
115
123
  log "Adding pattern: '#{pattern}'"
116
124
  end
@@ -29,7 +29,8 @@ README @group/with-nested/subgroup
29
29
  /docs/* @root-docs
30
30
 
31
31
  # This will make a `lib` directory nested anywhere in the repository match
32
- lib/ @lib-owner
32
+ lib/ @lib-owner
33
+ **/sources/php/ @lib-owner
33
34
 
34
35
  # Nested Wildcards is also supported
35
36
  widgets/**/Sources/ @widgets-owner
@@ -37,6 +38,10 @@ widgets/**/Sources/ @widgets-owner
37
38
  # If the path contains spaces, escape them like this:
38
39
  path\ with\ spaces/ @space-owner
39
40
 
41
+ # Nested directories starting without slash should match from anywhere
42
+ foo/bar/ @owners
43
+ feature/ @owners
44
+
40
45
  # Code Owners section:
41
46
 
42
47
  [Database]
@@ -40,10 +40,15 @@ module Danger
40
40
  "path with spaces2/missing.php",
41
41
  "sources/#file_with_pound.rb",
42
42
  "sources/#file_with_pound2.rb",
43
+ "very/nested/dir/foo/bar/something.swift",
44
+ "very/nested/foo/bar/something/something.swift",
45
+ "nested/feature/something.swift",
46
+ "nested/feature/something/something.swift",
43
47
  "module/LICENSE",
44
48
  "module/README",
45
49
  "nested/lib/source.js",
46
- "lib/source.js",
50
+ "very/nested/lib/source.js",
51
+ "very/nested/sources/php/source.php",
47
52
  "model/db/",
48
53
  "sources/something.go"
49
54
  ])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-missing_codeowners
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - andre-alves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-05 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api