Add first party support for Github App
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- github, go
- 领域
- api, authentication
调研方向
首先检查 github.Client、AppServiceCreateInstallationToken 和 ChecksService,以及 issue 中链接的 GitHub 三种身份验证流程。定义对 app、installation 和 user 凭据所需的 first-party 支持,包括在多次 API 调用之间安全地复用和刷新短期令牌。
由索引模型根据 Issue 内容生成。
描述
Many of the apis requires to be invoked as Github App, eg. https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28. And currently we need to use third-party packages like ghinstallation to do so.
However, this is not the full story. When creating a Github App, it involves many different kinds of creds:
And we need to use different cred to call different APIs. For now, the only way to do so is to create many different github.Clients, each holding a different credential.
And we need to do this with extra care, as all these token are short-lived, and need to be cached/refreshed periodically. Which means, blindly creating those clients will cause lots of rate limiting issues.
For instance, to use github.ChecksService, we need:
- Auth as Github App itself by creating a JWT with app's private key, to call
github.AppServiceCreateInstallationToken - Once we have the token, we can auth as app installation, then calling
github.ChecksService
Which requires 2 github.Clients in total.
- 主要语言
- Go
- 星标
- 11.3k
- 派生
- 2.6k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 43
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/go-github 的其他 Issue
-
http.Client.Timeout is ignored by redirect-aware requests可能已有人在做 @sb123sb123 于 19 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
-
Add Copilot content exclusion set/get enterprise and org set endpoints可能已有人在做 @Tens1des 于 33 天前认领。 未关闭
google/go-github#4526 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add Copilot custom agents enterprise endpoints可能已有人在做 @Tens1des 于 33 天前认领。 未关闭
google/go-github#4524 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Repository ruleset rule type `code_quality` is not modelled可能已有人在做 @etifontaine 于 36 天前认领。 未关闭
google/go-github#4520 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Including an enterprise team as a reviewer for an environment results an unmarshal error可能已有人在做 @JWilkinsonMB 于 52 天前认领。 未关闭
google/go-github#4457 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
bug go
难度 2/5 1-3 小时 新手友好度 82/100
genkit-ai/genkit#6761 · 1 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 2 天内回复
-
ready
难度 2/5 1-3 小时 新手友好度 92/100
kubeflow/pipelines#14784 · 1 条评论 ·
维护者通常 2 天内回复
-
bug frontend good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
trust: update-propagation-directive requires developer mode while add and remove do not可能已有人在做 @bhuvan-somisetty 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复