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

Support for running under GitHub apps #411

Open
DamianZaremba opened this issue Jun 24, 2021 · 0 comments · May be fixed by #412
Open

Support for running under GitHub apps #411

DamianZaremba opened this issue Jun 24, 2021 · 0 comments · May be fixed by #412

Comments

@DamianZaremba
Copy link

Currently you cannot execute the bot using a signed token from a GitHub app such as within GitHub actions due to the API calls which are gated by the integration flag.

Run pyup --provider=github --provider_url=https://api.github.com --repo=${GITHUB_REPOSITORY} --user-token=***
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.5/x64/bin/pyup", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/cli.py", line 50, in main
    bot.update(branch=branch, initial=initial)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/bot.py", line 123, in update
    self.apply_updates(
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/bot.py", line 173, in apply_updates
    (pr for pr in self.pull_requests if
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/bot.py", line 62, in pull_requests
    self.req_bundle.pull_requests = [
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/bot.py", line 62, in <listcomp>
    self.req_bundle.pull_requests = [
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pyup/providers/github.py", line 293, in iter_issues
    extra_kwargs["creator"] = creator.login
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/AuthenticatedUser.py", line 232, in login
    self._completeIfNotSet(self._login)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/GithubObject.py", line 299, in _completeIfNotSet
    self._completeIfNeeded()
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/GithubObject.py", line 303, in _completeIfNeeded
    self.__complete()
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/GithubObject.py", line 310, in __complete
    headers, data = self._requester.requestJsonAndCheck("GET", self._url.value)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/Requester.py", line 317, in requestJsonAndCheck
    return self.__check(
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/github/Requester.py", line 342, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/reference/users#get-the-authenticated-user"}
@DamianZaremba DamianZaremba linked a pull request Jun 24, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant