octokit 4.14.0 → 4.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +14 -13
- data/README.md +23 -18
- data/lib/octokit/authentication.rb +2 -11
- data/lib/octokit/client/actions_secrets.rb +58 -0
- data/lib/octokit/client/actions_workflow_runs.rb +105 -0
- data/lib/octokit/client/actions_workflows.rb +43 -0
- data/lib/octokit/client/apps.rb +43 -30
- data/lib/octokit/client/authorizations.rb +2 -70
- data/lib/octokit/client/checks.rb +0 -20
- data/lib/octokit/client/commit_branches.rb +20 -0
- data/lib/octokit/client/commit_pulls.rb +20 -0
- data/lib/octokit/client/commits.rb +6 -1
- data/lib/octokit/client/contents.rb +4 -0
- data/lib/octokit/client/deployments.rb +10 -0
- data/lib/octokit/client/events.rb +1 -0
- data/lib/octokit/client/issues.rb +7 -2
- data/lib/octokit/client/oauth_applications.rb +122 -0
- data/lib/octokit/client/organizations.rb +45 -17
- data/lib/octokit/client/pub_sub_hubbub.rb +2 -2
- data/lib/octokit/client/pull_requests.rb +1 -1
- data/lib/octokit/client/refs.rb +20 -4
- data/lib/octokit/client/repositories.rb +106 -8
- data/lib/octokit/client/repository_invitations.rb +1 -1
- data/lib/octokit/client/reviews.rb +18 -0
- data/lib/octokit/client/search.rb +1 -1
- data/lib/octokit/client/users.rb +86 -0
- data/lib/octokit/client.rb +15 -3
- data/lib/octokit/connection.rb +15 -12
- data/lib/octokit/error.rb +54 -2
- data/lib/octokit/middleware/follow_redirects.rb +5 -2
- data/lib/octokit/preview.rb +7 -3
- data/lib/octokit/rate_limit.rb +1 -1
- data/lib/octokit/response/feed_parser.rb +0 -2
- data/lib/octokit/response/raise_error.rb +0 -2
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +1 -0
- metadata +23 -3
data/lib/octokit/preview.rb
CHANGED
@@ -4,9 +4,11 @@ module Octokit
|
|
4
4
|
module Preview
|
5
5
|
|
6
6
|
PREVIEW_TYPES = {
|
7
|
-
:
|
8
|
-
:
|
7
|
+
:applications_api => 'application/vnd.github.doctor-strange-preview+json'.freeze,
|
8
|
+
:branch_protection => 'application/vnd.github.luke-cage-preview+json'.freeze,
|
9
9
|
:commit_search => 'application/vnd.github.cloak-preview+json'.freeze,
|
10
|
+
:commit_pulls => 'application/vnd.github.groot-preview+json'.freeze,
|
11
|
+
:commit_branches => 'application/vnd.github.groot-preview+json'.freeze,
|
10
12
|
:migrations => 'application/vnd.github.wyandotte-preview+json'.freeze,
|
11
13
|
:licenses => 'application/vnd.github.drax-preview+json'.freeze,
|
12
14
|
:source_imports => 'application/vnd.github.barred-rock-preview'.freeze,
|
@@ -17,10 +19,12 @@ module Octokit
|
|
17
19
|
:pages => 'application/vnd.github.mister-fantastic-preview+json'.freeze,
|
18
20
|
:projects => 'application/vnd.github.inertia-preview+json'.freeze,
|
19
21
|
:traffic => 'application/vnd.github.spiderman-preview'.freeze,
|
20
|
-
:integrations => 'application/vnd.github.machine-man-preview+json'.freeze,
|
21
22
|
:topics => 'application/vnd.github.mercy-preview+json'.freeze,
|
22
23
|
:community_profile => 'application/vnd.github.black-panther-preview+json'.freeze,
|
23
24
|
:strict_validation => 'application/vnd.github.speedy-preview+json'.freeze,
|
25
|
+
:template_repositories => 'application/vnd.github.baptiste-preview+json'.freeze,
|
26
|
+
:project_card_events => 'application/vnd.github.starfox-preview+json'.freeze,
|
27
|
+
:vulnerability_alerts => 'application/vnd.github.dorian-preview+json'.freeze,
|
24
28
|
}
|
25
29
|
|
26
30
|
def ensure_api_media_type(type, options)
|
data/lib/octokit/rate_limit.rb
CHANGED
@@ -20,7 +20,7 @@ module Octokit
|
|
20
20
|
# @return [RateLimit]
|
21
21
|
def self.from_response(response)
|
22
22
|
info = new
|
23
|
-
if response && !response.headers.nil?
|
23
|
+
if response && response.respond_to?(:headers) && !response.headers.nil?
|
24
24
|
info.limit = (response.headers['X-RateLimit-Limit'] || 1).to_i
|
25
25
|
info.remaining = (response.headers['X-RateLimit-Remaining'] || 1).to_i
|
26
26
|
info.resets_at = Time.at((response.headers['X-RateLimit-Reset'] || Time.now).to_i)
|
data/lib/octokit/version.rb
CHANGED
data/octokit.gemspec
CHANGED
@@ -6,6 +6,7 @@ require 'octokit/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.add_development_dependency 'bundler', '>= 1', '< 3'
|
8
8
|
spec.add_dependency 'sawyer', '>= 0.5.3', '~> 0.8.0'
|
9
|
+
spec.add_dependency 'faraday', '>= 0.9'
|
9
10
|
spec.authors = ["Wynn Netherland", "Erik Michaels-Ober", "Clint Shryock"]
|
10
11
|
spec.description = %q{Simple wrapper for the GitHub API}
|
11
12
|
spec.email = ['wynn.netherland@gmail.com', 'sferik@gmail.com', 'clint@ctshryock.com']
|
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.22.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:
|
13
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.8.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
55
69
|
description: Simple wrapper for the GitHub API
|
56
70
|
email:
|
57
71
|
- wynn.netherland@gmail.com
|
@@ -71,10 +85,15 @@ files:
|
|
71
85
|
- lib/octokit/arguments.rb
|
72
86
|
- lib/octokit/authentication.rb
|
73
87
|
- lib/octokit/client.rb
|
88
|
+
- lib/octokit/client/actions_secrets.rb
|
89
|
+
- lib/octokit/client/actions_workflow_runs.rb
|
90
|
+
- lib/octokit/client/actions_workflows.rb
|
74
91
|
- lib/octokit/client/apps.rb
|
75
92
|
- lib/octokit/client/authorizations.rb
|
76
93
|
- lib/octokit/client/checks.rb
|
94
|
+
- lib/octokit/client/commit_branches.rb
|
77
95
|
- lib/octokit/client/commit_comments.rb
|
96
|
+
- lib/octokit/client/commit_pulls.rb
|
78
97
|
- lib/octokit/client/commits.rb
|
79
98
|
- lib/octokit/client/community_profile.rb
|
80
99
|
- lib/octokit/client/contents.rb
|
@@ -95,6 +114,7 @@ files:
|
|
95
114
|
- lib/octokit/client/meta.rb
|
96
115
|
- lib/octokit/client/milestones.rb
|
97
116
|
- lib/octokit/client/notifications.rb
|
117
|
+
- lib/octokit/client/oauth_applications.rb
|
98
118
|
- lib/octokit/client/objects.rb
|
99
119
|
- lib/octokit/client/organizations.rb
|
100
120
|
- lib/octokit/client/pages.rb
|
@@ -160,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
180
|
- !ruby/object:Gem::Version
|
161
181
|
version: 1.3.5
|
162
182
|
requirements: []
|
163
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.1.2
|
164
184
|
signing_key:
|
165
185
|
specification_version: 4
|
166
186
|
summary: Ruby toolkit for working with the GitHub API
|