octokit 4.11.0 → 4.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octokit/client.rb +2 -0
- data/lib/octokit/client/apps.rb +1 -1
- data/lib/octokit/client/community_profile.rb +22 -0
- data/lib/octokit/client/issues.rb +11 -0
- data/lib/octokit/client/organizations.rb +2 -0
- data/lib/octokit/client/repositories.rb +15 -0
- data/lib/octokit/client/reviews.rb +2 -2
- data/lib/octokit/preview.rb +3 -1
- data/lib/octokit/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d79e41b0ec21db586820ddf1a791ce7a89ee06
|
4
|
+
data.tar.gz: 5720512cad786914d96be808efbc57f3c11e0c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bea9d7d21fc8697fb95b1f51c6e5272adac368a65ef274a7699bfe7a4e9436ce5bd71636abfd5963ed75405c29a83358b6ade21d97fd7cf7cbaf2be6f5a9e95
|
7
|
+
data.tar.gz: 658f7509dd017517e995dec0b32f8759053b0f0acf81cff20e5f9d7fe0060c05fae3433f5638ce1ba1ca788af6e357b749529b5418e68a2be88d2b3ec9d058d5
|
data/lib/octokit/client.rb
CHANGED
@@ -14,6 +14,7 @@ require 'octokit/client/apps'
|
|
14
14
|
require 'octokit/client/authorizations'
|
15
15
|
require 'octokit/client/commits'
|
16
16
|
require 'octokit/client/commit_comments'
|
17
|
+
require 'octokit/client/community_profile'
|
17
18
|
require 'octokit/client/contents'
|
18
19
|
require 'octokit/client/downloads'
|
19
20
|
require 'octokit/client/deployments'
|
@@ -70,6 +71,7 @@ module Octokit
|
|
70
71
|
include Octokit::Client::Authorizations
|
71
72
|
include Octokit::Client::Commits
|
72
73
|
include Octokit::Client::CommitComments
|
74
|
+
include Octokit::Client::CommunityProfile
|
73
75
|
include Octokit::Client::Contents
|
74
76
|
include Octokit::Client::Deployments
|
75
77
|
include Octokit::Client::Downloads
|
data/lib/octokit/client/apps.rb
CHANGED
@@ -79,7 +79,7 @@ module Octokit
|
|
79
79
|
|
80
80
|
# Enables an app to find the organization's installation information.
|
81
81
|
#
|
82
|
-
# @param
|
82
|
+
# @param organization [String] Organization GitHub login
|
83
83
|
# @param options [Hash] A customizable set of options
|
84
84
|
#
|
85
85
|
# @see https://developer.github.com/v3/apps/#find-organization-installation
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Octokit
|
2
|
+
class Client
|
3
|
+
|
4
|
+
# Methods for the Community Profile API
|
5
|
+
#
|
6
|
+
# @see https://developer.github.com/v3/repos/community/
|
7
|
+
module CommunityProfile
|
8
|
+
|
9
|
+
# Get community profile metrics for a repository
|
10
|
+
#
|
11
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
12
|
+
# @return [Sawyer::Resource] Community profile metrics
|
13
|
+
# @see https://developer.github.com/v3/repos/community/#retrieve-community-profile-metrics
|
14
|
+
# @example Get community profile metrics for octokit/octokit.rb
|
15
|
+
# @client.community_profile('octokit/octokit.rb')
|
16
|
+
def community_profile(repo, options = {})
|
17
|
+
options = ensure_api_media_type(:community_profile, options)
|
18
|
+
get "#{Repository.path repo}/community/profile", options
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -317,6 +317,17 @@ module Octokit
|
|
317
317
|
paginate "#{Repository.path repo}/issues/#{number}/timeline", options
|
318
318
|
end
|
319
319
|
|
320
|
+
# Lists the available assignees for issues in a repository.
|
321
|
+
#
|
322
|
+
# @param repo [Integer, String, Repository, Hash] A GitHub repository
|
323
|
+
# @return [Array<Sawyer::Resource>] List of GitHub users.
|
324
|
+
# @see https://developer.github.com/v3/issues/assignees/#list-assignees
|
325
|
+
# @example Get available assignees on repository octokit/octokit.rb
|
326
|
+
# Octokit.list_assignees("octokit/octokit.rb")
|
327
|
+
def list_assignees(repo, options = {})
|
328
|
+
paginate "#{Repository.path repo}/assignees", options
|
329
|
+
end
|
330
|
+
|
320
331
|
# Add assignees to an issue
|
321
332
|
#
|
322
333
|
# @param repo [Integer, String, Repository, Hash] A GitHub repository
|
@@ -686,8 +686,10 @@ module Octokit
|
|
686
686
|
def update_organization_membership(org, options = {})
|
687
687
|
options = options.dup
|
688
688
|
if user = options.delete(:user)
|
689
|
+
options.delete(:state)
|
689
690
|
put "orgs/#{org}/memberships/#{user}", options
|
690
691
|
else
|
692
|
+
options.delete(:role)
|
691
693
|
patch "user/memberships/orgs/#{org}", options
|
692
694
|
end
|
693
695
|
end
|
@@ -177,6 +177,21 @@ module Octokit
|
|
177
177
|
end
|
178
178
|
alias :delete_repo :delete_repository
|
179
179
|
|
180
|
+
# Transfer repository
|
181
|
+
#
|
182
|
+
# Transfer a repository owned by your organization
|
183
|
+
#
|
184
|
+
# @see https://developer.github.com/v3/repos/#transfer-a-repository
|
185
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
186
|
+
# @param new_owner [String] The username or organization name the repository will be transferred to.
|
187
|
+
# @param options [Array<Integer>] :team_ids ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
|
188
|
+
# @return [Sawyer::Resource] Repository info for the transferred repository
|
189
|
+
def transfer_repository(repo, new_owner, options = {})
|
190
|
+
options = ensure_api_media_type(:transfer_repository, options)
|
191
|
+
post "#{Repository.path repo}/transfer", options.merge({ new_owner: new_owner })
|
192
|
+
end
|
193
|
+
alias :transfer_repo :transfer_repository
|
194
|
+
|
180
195
|
# Hide a public repository
|
181
196
|
#
|
182
197
|
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
@@ -149,7 +149,7 @@ module Octokit
|
|
149
149
|
#
|
150
150
|
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
151
151
|
# @param number [Integer] Number ID of the pull request
|
152
|
-
# @param
|
152
|
+
# @param reviewers [Hash] :reviewers [Array<String>] An array of user logins
|
153
153
|
# @param options [Hash] :team_reviewers [Array<String>] An array of team slugs
|
154
154
|
# @see https://developer.github.com/v3/pulls/review_requests/#create-a-review-request
|
155
155
|
#
|
@@ -177,7 +177,7 @@ module Octokit
|
|
177
177
|
#
|
178
178
|
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
179
179
|
# @param id [Integer] The id of the pull request
|
180
|
-
# @param
|
180
|
+
# @param reviewers [Hash] :reviewers [Array] An array of user logins
|
181
181
|
# @param options [Hash] :team_reviewers [Array] An array of team slugs
|
182
182
|
#
|
183
183
|
# @see https://developer.github.com/v3/pulls/review_requests/#delete-a-review-request
|
data/lib/octokit/preview.rb
CHANGED
@@ -10,13 +10,15 @@ module Octokit
|
|
10
10
|
:licenses => 'application/vnd.github.drax-preview+json'.freeze,
|
11
11
|
:source_imports => 'application/vnd.github.barred-rock-preview'.freeze,
|
12
12
|
:reactions => 'application/vnd.github.squirrel-girl-preview'.freeze,
|
13
|
+
:transfer_repository => 'application/vnd.github.nightshade-preview+json'.freeze,
|
13
14
|
:issue_timelines => 'application/vnd.github.mockingbird-preview+json'.freeze,
|
14
15
|
:nested_teams => 'application/vnd.github.hellcat-preview+json'.freeze,
|
15
16
|
:pages => 'application/vnd.github.mister-fantastic-preview+json'.freeze,
|
16
17
|
:projects => 'application/vnd.github.inertia-preview+json'.freeze,
|
17
18
|
:traffic => 'application/vnd.github.spiderman-preview'.freeze,
|
18
19
|
:integrations => 'application/vnd.github.machine-man-preview+json'.freeze,
|
19
|
-
:topics => 'application/vnd.github.mercy-preview+json'.freeze
|
20
|
+
:topics => 'application/vnd.github.mercy-preview+json'.freeze,
|
21
|
+
:community_profile => 'application/vnd.github.black-panther-preview+json'.freeze
|
20
22
|
}
|
21
23
|
|
22
24
|
def ensure_api_media_type(type, options)
|
data/lib/octokit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wynn Netherland
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/octokit/client/authorizations.rb
|
70
70
|
- lib/octokit/client/commit_comments.rb
|
71
71
|
- lib/octokit/client/commits.rb
|
72
|
+
- lib/octokit/client/community_profile.rb
|
72
73
|
- lib/octokit/client/contents.rb
|
73
74
|
- lib/octokit/client/deployments.rb
|
74
75
|
- lib/octokit/client/downloads.rb
|
@@ -153,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
154
|
version: 1.3.5
|
154
155
|
requirements: []
|
155
156
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.5.2
|
157
|
+
rubygems_version: 2.5.2.3
|
157
158
|
signing_key:
|
158
159
|
specification_version: 4
|
159
160
|
summary: Ruby toolkit for working with the GitHub API
|