code_teams 1.0.0 → 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: 82e9081880258d807cdc9cb6393597d729e36ddb2cc0e91cc5f2179b52477d6a
4
- data.tar.gz: ef5116c3487e50cb9987bf110e64410a5c343341db448df9a9c3400b8ee0feee
3
+ metadata.gz: 443aa599a4db945ed8020950a938cdaad99818c52728883115b72cd5eda5c68a
4
+ data.tar.gz: 298e59f227cc4a07dd64fd2bc03dde9b57e46965dd7eb5be9ce72153928631a3
5
5
  SHA512:
6
- metadata.gz: 74a20af786913be7e7a12a5ad64c1605ddeca3ba895cb1733095d1b4762ffc26a08798073697c25d9939aa59c94174badaae70e37e7306b24b7ba2e62aac67d3
7
- data.tar.gz: d070407e8113266e5f364c7abc3485bee7bc15bdaa5a25d46e98c5066e9ccd4561ef1b9ad9808adb0ef9df4eebf613838a74bc8d78587795b8d97bec99837b19
6
+ metadata.gz: 744e2d89ba032674399ca1f449b5f139cc11fb9818e6411346c638c12232f727971e46500f4acbad832412299612f1ef3b3fbc38a6e77a582e1ea2779cbd3b73
7
+ data.tar.gz: ade5869ed1e8b5d4f5768b61c4c66df84ef0c6f0bd9190dbedbafabe9c0d8bfdd2e1ff83f3d83d6310934575ded45e274955651d9591c7fcf4fccbadea37fede
data/README.md CHANGED
@@ -41,7 +41,9 @@ class MyGithubPlugin < CodeTeams::Plugin
41
41
  errors = T.let([], T::Array[String])
42
42
 
43
43
  teams.each do |team|
44
- errors << missing_key_error_message(team, 'github.team') if self.for(team).github.team.nil?
44
+ if self.for(team).github.team.nil?
45
+ errors << missing_key_error_message(team, 'github.team')
46
+ end
45
47
  end
46
48
 
47
49
  errors
@@ -53,7 +55,7 @@ After adding the proper GitHub information to the team YML:
53
55
  ```yml
54
56
  name: My Team
55
57
  github:
56
- team: '@org/my-team
58
+ team: '@org/my-team'
57
59
  members:
58
60
  - member1
59
61
  - member2
@@ -70,8 +72,8 @@ Your plugins can be as simple or as complex as you want. Here are some other thi
70
72
  - Identifying which teams own which feature flags
71
73
  - Mapping teams to specific portions of the code through `code_ownership`
72
74
  - Allowing teams to protect certain files and require approval on modification of certain files
73
- - Specifying owned dependencies (ruby gems, javascript packages, and more)
74
- - Specifying how to get in touch with the team via slack (their channel and handle)
75
+ - Specifying owned dependencies (Ruby gems, JavaScript packages, and more)
76
+ - Specifying how to get in touch with the team via Slack (their channel and handle)
75
77
 
76
78
  ## Configuration
77
79
  You'll want to ensure that all teams are valid in your CI environment. We recommend running code like this in CI:
@@ -61,6 +61,16 @@ module CodeTeams
61
61
  T.unsafe(registry_for_team[self])
62
62
  end
63
63
 
64
+ sig { void }
65
+ def self.bust_caches!
66
+ all_plugins.each(&:clear_team_registry!)
67
+ end
68
+
69
+ sig { void }
70
+ def self.clear_team_registry!
71
+ @registry = nil
72
+ end
73
+
64
74
  private_class_method :registry
65
75
  private_class_method :register_team
66
76
  end
data/lib/code_teams.rb CHANGED
@@ -60,6 +60,7 @@ module CodeTeams
60
60
  # The primary reason this is helpful is for clients of CodeTeams who want to test their code, and each test context has different set of teams
61
61
  sig { void }
62
62
  def self.bust_caches!
63
+ Plugin.bust_caches!
63
64
  @all = nil
64
65
  @index_by_name = nil
65
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code_teams
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-14 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -91,8 +91,6 @@ files:
91
91
  - lib/code_teams.rb
92
92
  - lib/code_teams/plugin.rb
93
93
  - lib/code_teams/plugins/identity.rb
94
- - sorbet/config
95
- - sorbet/rbi/todo.rbi
96
94
  homepage: https://github.com/rubyatscale/code_teams
97
95
  licenses:
98
96
  - MIT
@@ -116,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
114
  - !ruby/object:Gem::Version
117
115
  version: '0'
118
116
  requirements: []
119
- rubygems_version: 3.3.7
117
+ rubygems_version: 3.1.6
120
118
  signing_key:
121
119
  specification_version: 4
122
120
  summary: A low-dependency gem for declaring and querying engineering teams
data/sorbet/config DELETED
@@ -1,2 +0,0 @@
1
- --dir
2
- .
data/sorbet/rbi/todo.rbi DELETED
@@ -1,5 +0,0 @@
1
- # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
- # srb rbi todo
3
-
4
- # typed: strong
5
- module ::RSpec; end