Skip to content

Commit

Permalink
change privacy of new teams
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Nov 4, 2021
1 parent 8a6a558 commit a558c97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/github.rb
Expand Up @@ -141,7 +141,7 @@ def get_user(username)
def add_new_team(org_team_name)
org_name, team_name = org_team_name.split('/')
begin
new_team = github_client.create_team(org_name, { name: team_name })
new_team = github_client.create_team(org_name, { name: team_name, privacy: "closed" })
rescue Octokit::ClientError => gh_err
logger.warn("Error trying to create team #{org_team_name}: #{gh_err.message}")
return false
Expand Down
2 changes: 1 addition & 1 deletion spec/github_spec.rb
Expand Up @@ -252,7 +252,7 @@
context "with valid permissions" do
before do
allow_any_instance_of(Octokit::Client).to receive(:create_team).
with("openjournals", {name: "superusers"}).
with("openjournals", {name: "superusers", privacy: "closed"}).
and_return({status: "201"})
end

Expand Down

0 comments on commit a558c97

Please sign in to comment.