Skip to content

Commit b278780

Browse files
author
Tom Osowski
authored
Merge pull request #138 from github/osowskit/media-types
Remove media types for APIs out of preview
2 parents 98abe1d + b8c46c1 commit b278780

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

api/ruby/discovering-resources-for-a-user/discovering_repositories.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Octokit.auto_paginate = true
44

5-
Octokit.default_media_type = "application/vnd.github.moondragon+json"
6-
75
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
86
# Instead, set and test environment variables, like below.
97
client = Octokit::Client.new :access_token => ENV["OAUTH_ACCESS_TOKEN"]

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)