@@ -8,7 +8,7 @@ module Apps
8
8
#
9
9
# @param options [Hash] A customizable set of options
10
10
#
11
- # @see https://developer .github.com/v3/ apps/#get-the-authenticated-app
11
+ # @see https://docs .github.com/en/rest/ apps/apps #get-the-authenticated-app
12
12
#
13
13
# @return [Sawyer::Resource] App information
14
14
def app ( options = { } )
@@ -19,29 +19,19 @@ def app(options = {})
19
19
#
20
20
# @param options [Hash] A customizable set of options
21
21
#
22
- # @see https://developer .github.com/v3/ apps/#list-installations
22
+ # @see https://docs .github.com/en/rest/ apps/apps #list-installations-for-the-authenticated-app
23
23
#
24
24
# @return [Array<Sawyer::Resource>] the total_count and an array of installations
25
25
def find_app_installations ( options = { } )
26
26
paginate 'app/installations' , options
27
27
end
28
28
alias find_installations find_app_installations
29
29
30
- def find_integration_installations ( options = { } )
31
- octokit_warn (
32
- 'Deprecated: Octokit::Client::Apps#find_integration_installations ' \
33
- 'method is deprecated. Please update your call to use ' \
34
- 'Octokit::Client::Apps#find_app_installations before the next major ' \
35
- 'Octokit version update.'
36
- )
37
- find_app_installations ( options )
38
- end
39
-
40
30
# Find all installations that are accessible to the authenticated user
41
31
#
42
32
# @param options [Hash] A customizable set of options
43
33
#
44
- # @see https://developer .github.com/v3/ apps/installations/ #list-installations-for-a- user
34
+ # @see https://docs .github.com/en/rest/ apps/installations#list-app- installations-accessible-to-the- user-access-token
45
35
#
46
36
# @return [Sawyer::Resource] the total_count and an array of installations
47
37
def find_user_installations ( options = { } )
@@ -54,7 +44,7 @@ def find_user_installations(options = {})
54
44
#
55
45
# @param id [Integer] Installation id
56
46
#
57
- # @see https://developer .github.com/v3/ apps/#get-an-installation
47
+ # @see https://docs .github.com/en/rest/ apps/apps #get-an-installation-for-the-authenticated-app
58
48
#
59
49
# @return [Sawyer::Resource] Installation information
60
50
def installation ( id , options = { } )
@@ -66,30 +56,20 @@ def installation(id, options = {})
66
56
# @param installation [Integer] The id of a GitHub App Installation
67
57
# @param options [Hash] A customizable set of options
68
58
#
69
- # @see https://developer .github.com/v3/ apps/#create-a-new- installation-token
59
+ # @see https://docs .github.com/en/rest/ apps/apps #create-an- installation-access- token-for-an-app
70
60
#
71
61
# @return [<Sawyer::Resource>] An installation token
72
62
def create_app_installation_access_token ( installation , options = { } )
73
63
post "app/installations/#{ installation } /access_tokens" , options
74
64
end
75
65
alias create_installation_access_token create_app_installation_access_token
76
66
77
- def create_integration_installation_access_token ( installation , options = { } )
78
- octokit_warn (
79
- 'Deprecated: Octokit::Client::Apps#create_integration_installation_access_token ' \
80
- 'method is deprecated. Please update your call to use ' \
81
- 'Octokit::Client::Apps#create_app_installation_access_token before the next major ' \
82
- 'Octokit version update.'
83
- )
84
- create_app_installation_access_token ( installation , options )
85
- end
86
-
87
67
# Enables an app to find the organization's installation information.
88
68
#
89
69
# @param organization [String] Organization GitHub login
90
70
# @param options [Hash] A customizable set of options
91
71
#
92
- # @see https://developer .github.com/v3/ apps/#get-an-organization-installation
72
+ # @see https://docs .github.com/en/rest/ apps/apps #get-an-organization-installation-for-the-authenticated-app
93
73
#
94
74
# @return [Sawyer::Resource] Installation information
95
75
def find_organization_installation ( organization , options = { } )
@@ -101,7 +81,7 @@ def find_organization_installation(organization, options = {})
101
81
# @param repo [String] A GitHub repository
102
82
# @param options [Hash] A customizable set of options
103
83
#
104
- # @see https://developer .github.com/v3/ apps/#get-a-repository-installation
84
+ # @see https://docs .github.com/en/rest/ apps/apps #get-a-repository-installation-for-the-authenticated-app
105
85
#
106
86
# @return [Sawyer::Resource] Installation information
107
87
def find_repository_installation ( repo , options = { } )
@@ -113,7 +93,7 @@ def find_repository_installation(repo, options = {})
113
93
# @param user [String] GitHub user login
114
94
# @param options [Hash] A customizable set of options
115
95
#
116
- # @see https://developer .github.com/v3/ apps/#get-a-user-installation
96
+ # @see https://docs .github.com/en/rest/ apps/apps #get-a-user-installation-for-the-authenticated-app
117
97
#
118
98
# @return [Sawyer::Resource] Installation information
119
99
def find_user_installation ( user , options = { } )
@@ -124,7 +104,7 @@ def find_user_installation(user, options = {})
124
104
#
125
105
# @param options [Hash] A customizable set of options
126
106
#
127
- # @see https://developer .github.com/v3/ apps/installations/ #list-repositories
107
+ # @see https://docs .github.com/en/rest/ apps/installations#list-repositories-accessible-to-the-app-installation
128
108
#
129
109
# @return [Sawyer::Resource] the total_count and an array of repositories
130
110
def list_app_installation_repositories ( options = { } )
@@ -134,70 +114,40 @@ def list_app_installation_repositories(options = {})
134
114
end
135
115
alias list_installation_repos list_app_installation_repositories
136
116
137
- def list_integration_installation_repositories ( options = { } )
138
- octokit_warn (
139
- 'Deprecated: Octokit::Client::Apps#list_integration_installation_repositories ' \
140
- 'method is deprecated. Please update your call to use ' \
141
- 'Octokit::Client::Apps#list_app_installation_repositories before the next major ' \
142
- 'Octokit version update.'
143
- )
144
- list_app_installation_repositories ( options )
145
- end
146
-
147
117
# Add a single repository to an installation
148
118
#
149
119
# @param installation [Integer] The id of a GitHub App Installation
150
120
# @param repo [Integer] The id of the GitHub repository
151
121
# @param options [Hash] A customizable set of options
152
122
#
153
- # @see https://developer .github.com/v3/ apps/installations/ #add-repository-to-installation
123
+ # @see https://docs .github.com/en/rest/ apps/installations#add-a- repository-to-an-app -installation
154
124
#
155
125
# @return [Boolean] Success
156
126
def add_repository_to_app_installation ( installation , repo , options = { } )
157
127
boolean_from_response :put , "user/installations/#{ installation } /repositories/#{ repo } " , options
158
128
end
159
129
alias add_repo_to_installation add_repository_to_app_installation
160
130
161
- def add_repository_to_integration_installation ( installation , repo , options = { } )
162
- octokit_warn (
163
- 'Deprecated: Octokit::Client::Apps#add_repository_to_integration_installation ' \
164
- 'method is deprecated. Please update your call to use ' \
165
- 'Octokit::Client::Apps#add_repository_to_app_installation before the next major ' \
166
- 'Octokit version update.'
167
- )
168
- add_repository_to_app_installation ( installation , repo , options )
169
- end
170
-
171
131
# Remove a single repository to an installation
172
132
#
173
133
# @param installation [Integer] The id of a GitHub App Installation
174
134
# @param repo [Integer] The id of the GitHub repository
175
135
# @param options [Hash] A customizable set of options
176
136
#
177
- # @see https://developer .github.com/v3/ apps/installations/ #remove-repository-from-installation
137
+ # @see https://docs .github.com/en/rest/ apps/installations#remove-a- repository-from-an-app -installation
178
138
#
179
139
# @return [Boolean] Success
180
140
def remove_repository_from_app_installation ( installation , repo , options = { } )
181
141
boolean_from_response :delete , "user/installations/#{ installation } /repositories/#{ repo } " , options
182
142
end
183
143
alias remove_repo_from_installation remove_repository_from_app_installation
184
144
185
- def remove_repository_from_integration_installation ( installation , repo , options = { } )
186
- octokit_warn (
187
- 'Deprecated: Octokit::Client::Apps#remove_repository_from_integration_installation ' \
188
- 'method is deprecated. Please update your call to use ' \
189
- 'Octokit::Client::Apps#remove_repository_from_app_installation before the next major ' \
190
- 'Octokit version update.'
191
- )
192
- remove_repository_from_app_installation ( installation , repo , options )
193
- end
194
-
195
145
# List repositories accessible to the user for an installation
196
146
#
197
147
# @param installation [Integer] The id of a GitHub App Installation
198
148
# @param options [Hash] A customizable set of options
199
149
#
200
- # @see https://developer .github.com/v3/ apps/installations/ #list-repositories-accessible-to-the-user-for-an-installation
150
+ # @see https://docs .github.com/en/rest/ apps/installations#list-repositories-accessible-to-the-user-access-token
201
151
#
202
152
# @return [Sawyer::Resource] the total_count and an array of repositories
203
153
def find_installation_repositories_for_user ( installation , options = { } )
@@ -211,7 +161,7 @@ def find_installation_repositories_for_user(installation, options = {})
211
161
# @param installation [Integer] The id of a GitHub App Installation
212
162
# @param options [Hash] A customizable set of options
213
163
#
214
- # @see https://developer .github.com/v3/ apps/#delete-an-installation
164
+ # @see https://docs .github.com/en/rest/ apps/apps #delete-an-installation-for-the-authenticated-app
215
165
#
216
166
# @return [Boolean] Success
217
167
def delete_installation ( installation , options = { } )
@@ -248,7 +198,7 @@ def app_hook_delivery(delivery_id, options = {})
248
198
# @param delivery_id [Integer] The id of a GitHub App Hook Delivery
249
199
# @param options [Hash] A customizable set of options
250
200
#
251
- # @see https://developer .github.com/v3/ apps/#redeliver-a-delivery-for-an-app-webhook
201
+ # @see https://docs .github.com/en/rest/ apps/webhooks #redeliver-a-delivery-for-an-app-webhook
252
202
#
253
203
# @return [Boolean] Success
254
204
def deliver_app_hook ( delivery_id , options = { } )
0 commit comments