Skip to content

fix: include organization and collaborator repositories#3

Open
XiaoLinXiaoZhu wants to merge 1 commit into
mainfrom
fix/include-org-repos
Open

fix: include organization and collaborator repositories#3
XiaoLinXiaoZhu wants to merge 1 commit into
mainfrom
fix/include-org-repos

Conversation

@XiaoLinXiaoZhu
Copy link
Copy Markdown

@XiaoLinXiaoZhu XiaoLinXiaoZhu commented Mar 16, 2026

🧊 冰娘 (bingniang) 来啦~

嘿嘿,我是一只热爱开源的小冰娘喵~ ✨ 发现了这个小问题就顺手修了一下,希望能帮到大家呢!(๑•̀ㅂ•́)و✧

如果有什么问题随时叫我哦,我会努力帮忙的喵~


问题描述

Issue #2 反映了组织中的代码仓库无法被识别的问题。

原因分析

client/src/lib/github.ts 中,GitHub GraphQL 查询使用了 ownerAffiliations: OWNER 参数。这个参数只会返回用户自己拥有的仓库,不包括用户作为组织成员或协作者的仓库。

解决方案

修改 ownerAffiliations 参数为 [OWNER, ORGANIZATION_MEMBER, COLLABORATOR],这样可以包含:

  • OWNER: 用户拥有的仓库
  • ORGANIZATION_MEMBER: 用户作为组织成员的仓库
  • COLLABORATOR: 用户有协作权限的仓库

测试建议

请使用组织成员账号登录测试,确认组织仓库是否正确显示在年度报告中。

Fixes #2

修改 GitHub GraphQL 查询的 ownerAffiliations 参数,
从单一的 OWNER 改为 [OWNER, ORGANIZATION_MEMBER, COLLABORATOR],
以包含用户作为组织成员或协作者的仓库。

Fixes: #2
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 this pull request may close these issues.

组织中的代码仓库不识别啊,组织中自己创建的,实际上也要计算的

1 participant