Skip to content

Commit e3969b5

Browse files
authored
Explicitely say that the team will be created if it's missing
1 parent dee4c22 commit e3969b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/entitlements/backend/github_team/service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def read_team(entitlement_group)
111111
metadata: team_metadata
112112
)
113113
rescue TeamNotFound
114-
Entitlements.logger.warn "Team #{team_identifier} does not exist in this GitHub.com organization"
114+
Entitlements.logger.warn "Team #{team_identifier} does not exist in this GitHub.com organization. If applied, the team will be created."
115115
return nil
116116
end
117117

spec/unit/entitlements/backend/github_team/service_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
expect(logger).to receive(:debug).with("Setting up GitHub API connection to https://github.fake/api/v3/")
8686
expect(logger).to receive(:debug).with("Loading GitHub team github.fake:kittensinc/team-does-not-exist")
87-
expect(logger).to receive(:warn).with("Team team-does-not-exist does not exist in this GitHub.com organization")
87+
expect(logger).to receive(:warn).with("Team team-does-not-exist does not exist in this GitHub.com organization. If applied, the team will be created.")
8888
result = subject.read_team(entitlement_group_doesnt_exist)
8989
expect(result).to eq(nil)
9090
end

0 commit comments

Comments
 (0)