danger-missing_codeowners 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcc8b0409118eaa0ddbab4a903a7573e734444cc7362c29e1eb1725cc617e70b
4
- data.tar.gz: cf214013da36794cc4ab47da98914e3630eeed04e20fc42988188a0a12196206
3
+ metadata.gz: 87deed89b9d5702658d37e55cc22c2b804142e2b4bbd6dafbcd22c9c95ff510d
4
+ data.tar.gz: 3203574f2c27a67f36df38f5bf76b25da7e9cf40ad4bc12814142c1764b85147
5
5
  SHA512:
6
- metadata.gz: 217d2d8cc83f6e9b8d4eb64e30ee9cb8140da863665b8677ceafa25a85736b6b1dfce4d5d8aa3052335c578d997197e488dae1468e3279138c34374b546f16cb
7
- data.tar.gz: 2fb655ba4b7c3966b6758b091e502f5489bc77d3a0e5106fd317bb4a5198d0a6761ddd6a100b31b6a4432b8179474c2426d2675f39b2bb0da20de090ba5be805
6
+ metadata.gz: 5779738fd0b9dab10a70df0cf498eedfdb2cc9e0f6be22cb33edbfc7c11461b3b7d00ddbc803dc4f482fdad54c38a87e5f02abe1fec2c047bfbf32240034e673
7
+ data.tar.gz: 77a436294408c61cac890c5f466519a2e3719867a63919b834375fc9faac07f5183d9a536aaedd5e623ee59680f8a78e410445813e14536b089d51dd1f8e9a92
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-missing_codeowners (1.0.0)
4
+ danger-missing_codeowners (1.0.1)
5
5
  danger-plugin-api (~> 1.0)
6
6
  pathspec (~> 1.0.0)
7
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MissingCodeowners
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -53,20 +53,26 @@ module Danger
53
53
  @verbose ||= false
54
54
 
55
55
  files = files_to_verify
56
+ log "Files to verify:"
57
+ log files.join("\n")
58
+
56
59
  codeowners_path = find_codeowners_file
57
60
  codeowners_lines = read_codeowners_file(codeowners_path)
58
61
  codeowners_spec = parse_codeowners_spec(codeowners_lines)
59
62
  @files_missing_codeowners = files.reject { |file| codeowners_spec.match file }
60
63
 
61
- return if @files_missing_codeowners.empty?
62
-
63
- log "Files missing CODEOWNERS:"
64
- log @files_missing_codeowners.join("\n")
64
+ if @files_missing_codeowners.any?
65
+ log "Files missing CODEOWNERS:"
66
+ log @files_missing_codeowners.join("\n")
65
67
 
66
- markdown format_missing_owners_message(@files_missing_codeowners, @max_number_of_files_to_report)
67
- danger_message = "Add CODEOWNERS rules to match all files."
68
+ markdown format_missing_owners_message(@files_missing_codeowners, @max_number_of_files_to_report)
69
+ danger_message = "Add CODEOWNERS rules to match all files."
70
+ @severity == "error" ? (fail danger_message) : (warn danger_message)
71
+ else
72
+ log "No files missing CODEOWNERS."
73
+ end
68
74
 
69
- @severity == "error" ? (fail danger_message) : (warn danger_message)
75
+ log "-----"
70
76
  end
71
77
 
72
78
  private
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.0
4
+ version: 1.0.1
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-03 00:00:00.000000000 Z
11
+ date: 2021-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api