Enterprise Teams support

未關閉 適合新手
#196 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
github, python

研究方向

從 auth.py 中的 _get_installation_id 開始,traceback 顯示安裝帳戶是透過 login 配對的。比較 issue 中描述的 enterprise 帳戶欄位,並驗證 enterprise installation 的安裝權杖產生;當查找不再引發 KeyError 且選取預期的 installation 時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
Python
星號
3
分支
8
平均合併
1 天 3 小時
30 天內合併 PR
8

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

mozilla-releng/simple-github 的其他 Issue

查看 mozilla-releng/simple-github 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。