Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mikebronner opened this issue Dec 15, 2018 · 1 comment · Fixed by #989
Closed

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

mikebronner opened this issue Dec 15, 2018 · 1 comment · Fixed by #989

Comments

@mikebronner
Copy link

mikebronner commented Dec 15, 2018

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!

@acrobat
Copy link
Collaborator

acrobat commented Mar 28, 2021

The docs issue will be fixed in #989

I think the other error has more to do with how you are authenticated instead of a bug in this library. Please check your code against the github docs

If there is still a bug with this library, please open a new issue. Thanks!

acrobat added a commit that referenced this issue Mar 28, 2021
This PR was merged into the 2.x branch.

Discussion
----------

Fixes #761

Commits
-------

f3ea9b3 Fixed incorrect parameters in apps docs
@acrobat acrobat closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants