Enterprise Teams support
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- github, python
- Domain
- authentication
Research direction
Start in auth.py at _get_installation_id, where the traceback shows the installation account is matched by login. Compare the enterprise account fields described in the issue and verify installation-token generation for an enterprise installation; done means the lookup no longer raises KeyError and selects the intended installation.
Written by the indexing model from the issue text.
Description
If using an app which has been installed at an enterprise level, there is a failure is auth.py looking for the account login.
File "/home/shtrom/work/reviewer-selector/src/reviewer_selector/github.py", line 54, in async_generate_github_token
token = await inst_auth.get_token()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shtrom/work/reviewer-selector/.venv/lib/python3.12/site-packages/simple_github/auth.py", line 200, in get_token
return await anext(self._generator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shtrom/work/reviewer-selector/.venv/lib/python3.12/site-packages/simple_github/auth.py", line 13, in anext
return await ait.__anext__()
^^^^^^^^^^^^^^^^^^^^^
File "/home/shtrom/work/reviewer-selector/.venv/lib/python3.12/site-packages/simple_github/auth.py", line 169, in _gen_installation_token
installation_id = await self._get_installation_id()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shtrom/work/reviewer-selector/.venv/lib/python3.12/site-packages/simple_github/auth.py", line 146, in _get_installation_id
if installation["account"]["login"] == self.owner:
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'login'
This is because enterprises have an account.slug rather than an account.owner.
- Dominant language
- Python
- Stars
- 3
- Forks
- 8
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla-releng/simple-github
-
Dependency Dashboard Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in mozilla-releng/simple-github
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100