code_teams 1.0.0 → 1.0.2
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 +4 -4
- data/README.md +6 -4
- data/lib/code_teams/plugin.rb +10 -0
- data/lib/code_teams.rb +1 -0
- metadata +3 -5
- data/sorbet/config +0 -2
- data/sorbet/rbi/todo.rbi +0 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 443aa599a4db945ed8020950a938cdaad99818c52728883115b72cd5eda5c68a
         | 
| 4 | 
            +
              data.tar.gz: 298e59f227cc4a07dd64fd2bc03dde9b57e46965dd7eb5be9ce72153928631a3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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 | 
            -
                   | 
| 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 ( | 
| 74 | 
            -
            - Specifying how to get in touch with the team via  | 
| 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:
         | 
    
        data/lib/code_teams/plugin.rb
    CHANGED
    
    | @@ -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. | 
| 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:  | 
| 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. | 
| 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