octokit 7.0.0 → 7.2.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/actions_secrets.rb +53 -0
- data/lib/octokit/client/apps.rb +25 -0
- data/lib/octokit/repository.rb +2 -1
- data/lib/octokit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab72372e0317944ac3a6c8b4e166bad268bea9524ef8bde2f5cacb13ee471d28
|
4
|
+
data.tar.gz: 19be89924891fb2a771d17fb739fad7454bc8cb79c66950d7c64eb426ab2aef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38724e4929489a803f1aa9e3186633217bd8473585b35a90ee82fd2985abc361b03af97c96e089759e1c1d2388fcb6cc4fba2d496aae0abfcc214265e0a54770
|
7
|
+
data.tar.gz: b2b589fccec5e74cddc322b850ac9bd04a0dd7300476b6b3758059bcba62b7651a10d634683f0e427ea4c049e78ee52542319206571493ce84241a326af5d6d7
|
@@ -54,6 +54,59 @@ module Octokit
|
|
54
54
|
def delete_actions_secret(repo, name)
|
55
55
|
boolean_from_response :delete, "#{Repository.path repo}/actions/secrets/#{name}"
|
56
56
|
end
|
57
|
+
|
58
|
+
# Get environment public key for secrets encryption
|
59
|
+
#
|
60
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
61
|
+
# @param environment [String] Name of environment
|
62
|
+
# @return [Hash] key_id and key
|
63
|
+
# @see https://docs.github.com/en/rest/actions/secrets#get-an-environment-public-key
|
64
|
+
def get_actions_environment_public_key(repo, environment)
|
65
|
+
get "#{Repository.path repo}/environments/#{environment}/secrets/public-key"
|
66
|
+
end
|
67
|
+
|
68
|
+
# List environment secrets
|
69
|
+
#
|
70
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
71
|
+
# @param environment [String] Name of environment
|
72
|
+
# @return [Hash] total_count and list of secrets (each item is hash with name, created_at and updated_at)
|
73
|
+
# @see https://developer.github.com/v3/actions/secrets/#list-environment-secrets
|
74
|
+
def list_actions_environment_secrets(repo, environment)
|
75
|
+
paginate "#{Repository.path repo}/environments/#{environment}/secrets" do |data, last_response|
|
76
|
+
data.secrets.concat last_response.data.secrets
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Get an environment secret
|
81
|
+
#
|
82
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
83
|
+
# @param environment [String] Name of environment
|
84
|
+
# @param name [String] Name of secret
|
85
|
+
# @return [Hash] name, created_at and updated_at
|
86
|
+
# @see https://docs.github.com/en/rest/actions/secrets#get-an-environment-secret
|
87
|
+
def get_actions_environment_secret(repo, environment, name)
|
88
|
+
get "#{Repository.path repo}/environments/#{environment}/secrets/#{name}"
|
89
|
+
end
|
90
|
+
|
91
|
+
# Create or update an environment secret
|
92
|
+
#
|
93
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
94
|
+
# @param environment [String] Name of environment
|
95
|
+
# @param name [String] Name of secret
|
96
|
+
# @param options [Hash] encrypted_value and key_id
|
97
|
+
# @see https://docs.github.com/en/rest/actions/secrets#create-or-update-an-environment-secret
|
98
|
+
def create_or_update_actions_environment_secret(repo, environment, name, options)
|
99
|
+
put "#{Repository.path repo}/environments/#{environment}/secrets/#{name}", options
|
100
|
+
end
|
101
|
+
|
102
|
+
# Delete environment secret
|
103
|
+
# @param repo [Integer, String, Hash, Repository] A GitHub repository
|
104
|
+
# @param environment [String] Name of environment
|
105
|
+
# @param name [String] Name of secret
|
106
|
+
# @see https://docs.github.com/en/rest/actions/secrets#delete-an-environment-secret
|
107
|
+
def delete_actions_environment_secret(repo, environment, name)
|
108
|
+
boolean_from_response :delete, "#{Repository.path repo}/environments/#{environment}/secrets/#{name}"
|
109
|
+
end
|
57
110
|
end
|
58
111
|
end
|
59
112
|
end
|
data/lib/octokit/client/apps.rb
CHANGED
@@ -217,6 +217,31 @@ module Octokit
|
|
217
217
|
def delete_installation(installation, options = {})
|
218
218
|
boolean_from_response :delete, "app/installations/#{installation}", options
|
219
219
|
end
|
220
|
+
|
221
|
+
# Returns a list of webhook deliveries for the webhook configured for a GitHub App.
|
222
|
+
#
|
223
|
+
# @param options [Hash] A customizable set of options
|
224
|
+
#
|
225
|
+
# @see https://docs.github.com/en/rest/apps/webhooks#list-deliveries-for-an-app-webhook
|
226
|
+
#
|
227
|
+
# @return [Array<Hash>] an array of hook deliveries
|
228
|
+
def list_app_hook_deliveries(options = {})
|
229
|
+
paginate('app/hook/deliveries', options) do |data, last_response|
|
230
|
+
data.concat last_response.data
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# Redeliver a delivery for the webhook configured for a GitHub App.
|
235
|
+
#
|
236
|
+
# @param delivery_id [Integer] The id of a GitHub App Hook Delivery
|
237
|
+
# @param options [Hash] A customizable set of options
|
238
|
+
#
|
239
|
+
# @see https://developer.github.com/v3/apps/#redeliver-a-delivery-for-an-app-webhook
|
240
|
+
#
|
241
|
+
# @return [Boolean] Success
|
242
|
+
def deliver_app_hook(delivery_id, options = {})
|
243
|
+
boolean_from_response :post, "app/hook/deliveries/#{delivery_id}/attempts", options
|
244
|
+
end
|
220
245
|
end
|
221
246
|
end
|
222
247
|
end
|
data/lib/octokit/repository.rb
CHANGED
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: 7.
|
4
|
+
version: 7.2.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: 2023-
|
13
|
+
date: 2023-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: 1.3.5
|
169
169
|
requirements: []
|
170
|
-
rubygems_version: 3.4.
|
170
|
+
rubygems_version: 3.4.20
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Ruby toolkit for working with the GitHub API
|