fast_code_owners 0.0.8-aarch64-linux → 0.0.9-aarch64-linux

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: eadd130b2f57a7aad0b794d49de6990bbf29308cae58840e237fbe435af77731
4
- data.tar.gz: 50d285a672fb785f3f7fbafa080f8a177edaf8fa93700d6cc81d0bd865ab60eb
3
+ metadata.gz: c2a05bb546542916948ad5a37721cc5986ae54524f6547c8440db074e348948f
4
+ data.tar.gz: 3de7036e0bf6245b2691cf99ebb3a2910618499582fdbb5fedcf139e307f593e
5
5
  SHA512:
6
- metadata.gz: dc0c98d3099a130ddcb1b091e898c4748808948127590fee78355121d353427e9cf81cd7c63c750dc7f26ed6906d3a37b8ec8434de6cde60aaf1094275bb5632
7
- data.tar.gz: 4ccfb34bffdaf7f3973bdf400754ed3bd442b2b394252cfe6aa98bfb43c31bcc61eadddd51df72bf44da6f04128ed1a64b4c7117393b36b54e78e3202af87e6e
6
+ metadata.gz: 11d96e97b32eb70021cd9b893d6e742eee218821477d2e6f5d0ce259a3631aca8bc42521ee25d5295b633c3222a5d47e8125f2185af17bb9aeb6f2e4e6fbfb3a
7
+ data.tar.gz: dc02c968adf3dc75e147c9346773ad7b27b0e8847e3fd8e5b624e507c12de6b698bf100150d612525e1600cae4a901b3d04ae5f26feb8c9ba0e9c68dc364f3db
@@ -63,11 +63,17 @@ module FastCodeOwners
63
63
  nil
64
64
  end
65
65
 
66
- FastCodeOwners.validate!(
66
+ result = FastCodeOwners.validate!(
67
67
  files: files,
68
68
  autocorrect: !options[:skip_autocorrect],
69
69
  stage_changes: !options[:skip_stage]
70
70
  )
71
+ puts "cli result: #{result}"
72
+ if result.nil?
73
+ puts 'No errors found'
74
+ else
75
+ puts result
76
+ end
71
77
  end
72
78
 
73
79
  # For now, this just returns team ownership
@@ -15,10 +15,10 @@ module FastCodeOwners
15
15
  def for_file(file_path)
16
16
  return nil if file_path.start_with?('./')
17
17
 
18
- # return FilePathTeamCache.get(file_path) if FilePathTeamCache.cached?(file_path)
18
+ return FilePathTeamCache.get(file_path) if FilePathTeamCache.cached?(file_path)
19
+
19
20
  result = T.let(RustCodeOwners.for_file(file_path), T.nilable(T::Hash[Symbol, String]))
20
21
  return if result.nil?
21
- puts "ruby result: #{result}"
22
22
 
23
23
  if result[:team_name].nil?
24
24
  FilePathTeamCache.set(file_path, nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastCodeOwners
4
- VERSION = '0.0.8'
4
+ VERSION = '0.0.9'
5
5
  end
@@ -30,14 +30,18 @@ module FastCodeOwners
30
30
  autocorrect: T::Boolean,
31
31
  stage_changes: T::Boolean,
32
32
  files: T.nilable(T::Array[String])
33
- ).void
33
+ ).returns(T.nilable(T::Hash[Symbol, String]))
34
34
  end
35
35
  def validate!(
36
36
  autocorrect: true,
37
37
  stage_changes: true,
38
38
  files: nil
39
39
  )
40
- # todo
40
+ if autocorrect
41
+ ::RustCodeOwners.generate_and_validate
42
+ else
43
+ ::RustCodeOwners.validate
44
+ end
41
45
  end
42
46
 
43
47
  sig { params(file_path: String).returns(T.nilable(CodeTeams::Team)) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast_code_owners
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Perry Hertler