octokit 7.0.0 → 7.1.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/repository.rb +2 -1
- data/lib/octokit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27b858e49de1997cc637b78dd77f283f49164e16783d58b665e55da23a2fe957
|
4
|
+
data.tar.gz: f2447bb4e8e8a15e45eb43ebf771a4a04d2fbb9f1615ef9cd835347bb289f33f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e616a14ccdeba68b690f0d3956a6e8eaf45963615231c9c2d95bbef41d3da5bba70401aff57676bdcefcd9d49095cf19932c1383cd8c5d8bb9f54d246f5a48d
|
7
|
+
data.tar.gz: afeaa8ff5a087af75af032b14ffb7428614bd76827fd987a35f36614601ed62d2592961ef09327357ec7b1378ca6b214ef251daa5be5afab5bee5e1c8656fd1f
|
@@ -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/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.1.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-08-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|