@@ -183,10 +183,6 @@ public void setPermissions(Map<String, String> permissions) {
183183 throw new RuntimeException ("Do not use this method." );
184184 }
185185
186- GHApp wrapUp (GitHub root ) {
187- return this ;
188- }
189-
190186 /**
191187 * Obtains all the installations associated with this app.
192188 * <p>
@@ -200,7 +196,7 @@ public PagedIterable<GHAppInstallation> listInstallations() {
200196 return root ().createRequest ()
201197 .withPreview (MACHINE_MAN )
202198 .withUrlPath ("/app/installations" )
203- .toIterable (GHAppInstallation [].class , item -> item . wrapUp ( root ()) );
199+ .toIterable (GHAppInstallation [].class , null );
204200 }
205201
206202 /**
@@ -220,8 +216,7 @@ public GHAppInstallation getInstallationById(long id) throws IOException {
220216 return root ().createRequest ()
221217 .withPreview (MACHINE_MAN )
222218 .withUrlPath (String .format ("/app/installations/%d" , id ))
223- .fetch (GHAppInstallation .class )
224- .wrapUp (root ());
219+ .fetch (GHAppInstallation .class );
225220 }
226221
227222 /**
@@ -242,8 +237,7 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc
242237 return root ().createRequest ()
243238 .withPreview (MACHINE_MAN )
244239 .withUrlPath (String .format ("/orgs/%s/installation" , name ))
245- .fetch (GHAppInstallation .class )
246- .wrapUp (root ());
240+ .fetch (GHAppInstallation .class );
247241 }
248242
249243 /**
@@ -266,8 +260,7 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re
266260 return root ().createRequest ()
267261 .withPreview (MACHINE_MAN )
268262 .withUrlPath (String .format ("/repos/%s/%s/installation" , ownerName , repositoryName ))
269- .fetch (GHAppInstallation .class )
270- .wrapUp (root ());
263+ .fetch (GHAppInstallation .class );
271264 }
272265
273266 /**
@@ -287,8 +280,7 @@ public GHAppInstallation getInstallationByUser(String name) throws IOException {
287280 return root ().createRequest ()
288281 .withPreview (MACHINE_MAN )
289282 .withUrlPath (String .format ("/users/%s/installation" , name ))
290- .fetch (GHAppInstallation .class )
291- .wrapUp (root ());
283+ .fetch (GHAppInstallation .class );
292284 }
293285
294286}
0 commit comments