Skip to content

Commit

Permalink
Avoid cache collision for org teams in unique GitHub instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmacgowan committed Jan 29, 2024
1 parent 1e87a3c commit 9fcffc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/entitlements/backend/github_team/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class TeamNotFound < RuntimeError; end
def initialize(addr: nil, org:, token:, ou:, ignore_not_found: false)
super
Entitlements.cache[:github_team_members] ||= {}
Entitlements.cache[:github_team_members][org] ||= {}
@team_cache = Entitlements.cache[:github_team_members][org]
Entitlements.cache[:github_team_members][org_signature] ||= {}
@team_cache = Entitlements.cache[:github_team_members][org_signature]
end

# Read a single team identified by its slug and return a team object.
Expand Down

0 comments on commit 9fcffc6

Please sign in to comment.