Skip to content

Documentation of ->api("apps")->removeRepository() Incorrect #761

Description

@mikebronner

The documentation of ->api("apps")->removeRepository() as shown here (https://github.com/KnpLabs/php-github-api/blob/master/doc/apps.md) seems to be incorrect. This code () seems to require 2 arguments, but the documentation shows only one.

When I try to execute the method with two arguments $installationId and $respositoryId I get the following error:

[2018-12-15 01:53:50] local.ERROR: Resource not accessible by integration {"userId":1,"email":"mike@genealabs.com","exception":"[object] (Github\\Exception\\RuntimeException(code: 403): Resource not accessible by integration at /home/vagrant/Sites/githelpdesk.com/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php:87)
[stacktrace]
#0 /vendor/php-http/httplug/src/Promise/HttpFulfilledPromise.php(34): Github\\HttpClient\\Plugin\\GithubExceptionThrower->Github\\HttpClient\\Plugin\\{closure}(Object(GuzzleHttp\\Psr7\\Response))
#1 /vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php(88): Http\\Client\\Promise\\HttpFulfilledPromise->then(Object(Closure))
#2 /vendor/php-http/client-common/src/PluginClient.php(160): Github\\HttpClient\\Plugin\\GithubExceptionThrower->handleRequest(Object(GuzzleHttp\\Psr7\\Request), Object(Closure), Object(Closure))
#3 /vendor/php-http/client-common/src/PluginClient.php(174): Http\\Client\\Common\\PluginClient->Http\\Client\\Common\\{closure}(Object(GuzzleHttp\\Psr7\\Request))
#4 /vendor/php-http/client-common/src/PluginClient.php(87): Http\\Client\\Common\\PluginClient->Http\\Client\\Common\\{closure}(Object(GuzzleHttp\\Psr7\\Request))
#5 /vendor/php-http/client-common/src/HttpMethodsClient.php(203): Http\\Client\\Common\\PluginClient->sendRequest(Object(GuzzleHttp\\Psr7\\Request))
#6 /vendor/php-http/client-common/src/HttpMethodsClient.php(192): Http\\Client\\Common\\HttpMethodsClient->sendRequest(Object(GuzzleHttp\\Psr7\\Request))
#7 /vendor/php-http/client-common/src/HttpMethodsClient.php(155): Http\\Client\\Common\\HttpMethodsClient->send('DELETE', '/installations/...', Array, NULL)
#8 /vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php(226): Http\\Client\\Common\\HttpMethodsClient->delete('/installations/...', Array, NULL)
#9 /vendor/knplabs/github-api/lib/Github/Api/Apps.php(91): Github\\Api\\AbstractApi->delete('/installations/...')
...

I am authenticating as my GitHub app as described at the bottom of this page: https://github.com/KnpLabs/php-github-api/blob/master/doc/security.md

Any suggestions on what I need to do to make this work? Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions