Skip to content

Commit 57f8600

Browse files
authored
BREAKING CHANGE: Remove app methods that have been deprecated since v4.8.0
Removes: find_integration_installations, create_integration_installation_access_token, list_integration_installation_repositories, add_repository_to_integration_installation, remove_repository_from_integration_installation
2 parents 664b02d + 41494e8 commit 57f8600

File tree

7 files changed

+14
-121
lines changed

7 files changed

+14
-121
lines changed

lib/octokit/client/apps.rb

Lines changed: 14 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Apps
88
#
99
# @param options [Hash] A customizable set of options
1010
#
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
1212
#
1313
# @return [Sawyer::Resource] App information
1414
def app(options = {})
@@ -19,29 +19,19 @@ def app(options = {})
1919
#
2020
# @param options [Hash] A customizable set of options
2121
#
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
2323
#
2424
# @return [Array<Sawyer::Resource>] the total_count and an array of installations
2525
def find_app_installations(options = {})
2626
paginate 'app/installations', options
2727
end
2828
alias find_installations find_app_installations
2929

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-
4030
# Find all installations that are accessible to the authenticated user
4131
#
4232
# @param options [Hash] A customizable set of options
4333
#
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
4535
#
4636
# @return [Sawyer::Resource] the total_count and an array of installations
4737
def find_user_installations(options = {})
@@ -54,7 +44,7 @@ def find_user_installations(options = {})
5444
#
5545
# @param id [Integer] Installation id
5646
#
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
5848
#
5949
# @return [Sawyer::Resource] Installation information
6050
def installation(id, options = {})
@@ -66,30 +56,20 @@ def installation(id, options = {})
6656
# @param installation [Integer] The id of a GitHub App Installation
6757
# @param options [Hash] A customizable set of options
6858
#
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
7060
#
7161
# @return [<Sawyer::Resource>] An installation token
7262
def create_app_installation_access_token(installation, options = {})
7363
post "app/installations/#{installation}/access_tokens", options
7464
end
7565
alias create_installation_access_token create_app_installation_access_token
7666

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-
8767
# Enables an app to find the organization's installation information.
8868
#
8969
# @param organization [String] Organization GitHub login
9070
# @param options [Hash] A customizable set of options
9171
#
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
9373
#
9474
# @return [Sawyer::Resource] Installation information
9575
def find_organization_installation(organization, options = {})
@@ -101,7 +81,7 @@ def find_organization_installation(organization, options = {})
10181
# @param repo [String] A GitHub repository
10282
# @param options [Hash] A customizable set of options
10383
#
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
10585
#
10686
# @return [Sawyer::Resource] Installation information
10787
def find_repository_installation(repo, options = {})
@@ -113,7 +93,7 @@ def find_repository_installation(repo, options = {})
11393
# @param user [String] GitHub user login
11494
# @param options [Hash] A customizable set of options
11595
#
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
11797
#
11898
# @return [Sawyer::Resource] Installation information
11999
def find_user_installation(user, options = {})
@@ -124,7 +104,7 @@ def find_user_installation(user, options = {})
124104
#
125105
# @param options [Hash] A customizable set of options
126106
#
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
128108
#
129109
# @return [Sawyer::Resource] the total_count and an array of repositories
130110
def list_app_installation_repositories(options = {})
@@ -134,70 +114,40 @@ def list_app_installation_repositories(options = {})
134114
end
135115
alias list_installation_repos list_app_installation_repositories
136116

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-
147117
# Add a single repository to an installation
148118
#
149119
# @param installation [Integer] The id of a GitHub App Installation
150120
# @param repo [Integer] The id of the GitHub repository
151121
# @param options [Hash] A customizable set of options
152122
#
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
154124
#
155125
# @return [Boolean] Success
156126
def add_repository_to_app_installation(installation, repo, options = {})
157127
boolean_from_response :put, "user/installations/#{installation}/repositories/#{repo}", options
158128
end
159129
alias add_repo_to_installation add_repository_to_app_installation
160130

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-
171131
# Remove a single repository to an installation
172132
#
173133
# @param installation [Integer] The id of a GitHub App Installation
174134
# @param repo [Integer] The id of the GitHub repository
175135
# @param options [Hash] A customizable set of options
176136
#
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
178138
#
179139
# @return [Boolean] Success
180140
def remove_repository_from_app_installation(installation, repo, options = {})
181141
boolean_from_response :delete, "user/installations/#{installation}/repositories/#{repo}", options
182142
end
183143
alias remove_repo_from_installation remove_repository_from_app_installation
184144

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-
195145
# List repositories accessible to the user for an installation
196146
#
197147
# @param installation [Integer] The id of a GitHub App Installation
198148
# @param options [Hash] A customizable set of options
199149
#
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
201151
#
202152
# @return [Sawyer::Resource] the total_count and an array of repositories
203153
def find_installation_repositories_for_user(installation, options = {})
@@ -211,7 +161,7 @@ def find_installation_repositories_for_user(installation, options = {})
211161
# @param installation [Integer] The id of a GitHub App Installation
212162
# @param options [Hash] A customizable set of options
213163
#
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
215165
#
216166
# @return [Boolean] Success
217167
def delete_installation(installation, options = {})
@@ -248,7 +198,7 @@ def app_hook_delivery(delivery_id, options = {})
248198
# @param delivery_id [Integer] The id of a GitHub App Hook Delivery
249199
# @param options [Hash] A customizable set of options
250200
#
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
252202
#
253203
# @return [Boolean] Success
254204
def deliver_app_hook(delivery_id, options = {})

spec/cassettes/Octokit_Client_Apps/_find_integration_installations/returns_installations_for_an_integration.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/cassettes/Octokit_Client_Apps/with_app_installation/_create_integration_installation_access_token/creates_an_access_token_for_the_installation.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/cassettes/Octokit_Client_Apps/with_app_installation/with_app_installation_access_token/_list_integration_installation_repositories/lists_the_installations_repositories.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)