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

Only extract the needed token information #21

Closed
wants to merge 1 commit into from

Commits on Jul 18, 2019

  1. Only extract the needed token information

    According to the documentation the result can contain:
    
    * token
    * expires_at
    * permissions
    * repositories
    
    Currently it doesn't care about the additional attributes, but it is
    making the application fail:
    
        Traceback (most recent call last):
          File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
            return loop.run_until_complete(main)
          File "/usr/local/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
            return future.result()
          File "/usr/local/lib/python3.7/site-packages/octomachinery/app/server/machinery.py", line 43, in run_forever
            async with GitHubApp(config.github) as github_app:
          File "/usr/local/lib/python3.7/site-packages/octomachinery/github/api/app_client.py", line 69, in __aenter__
            self._installations = await self.get_installations()
          File "/usr/local/lib/python3.7/site-packages/octomachinery/github/api/app_client.py", line 162, in get_installations
            await installations[install.id].retrieve_access_token()
          File "/usr/local/lib/python3.7/site-packages/octomachinery/github/entities/app_installation.py", line 49, in retrieve_access_token
            accept='application/vnd.github.machine-man-preview+json',
        TypeError: __init__() got an unexpected keyword argument 'permissions'
    
    This started to show up when the application was made public and added
    to another organization.
    
    [1]: https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/
    ekohl committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    922c5cb View commit details
    Browse the repository at this point in the history