Skip to content

Commit ea0e415

Browse files
author
Thomas Osowski
committed
Remove media type and bug fix
1 parent 98616ab commit ea0e415

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

api/ruby/ghe-org-permissions-report.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# organizations
1010
require 'octokit'
1111

12-
Octokit.default_media_type = 'application/vnd.github.ironman-preview+json'
1312
ghe = Octokit::Client.new
1413

1514
PERMISSION_LEVELS = [:admin, :push, :pull]
@@ -98,7 +97,7 @@ def get_org_role(ghe, org_name, user_login)
9897
'org-admin'
9998
elsif org_role == 'outside-collaborator'
10099
'org-collaborator'
101-
elsif PERMISSION_LEVELS.index(perms) < best_team_permission
100+
elsif !best_team_permission.nil? && PERMISSION_LEVELS.index(perms) < best_team_permission
102101
'org-default-permission'
103102
else
104103
'team'

0 commit comments

Comments
 (0)