- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经阅读了以下文档 ( https://developer.github.com/v3/repos/#list-contributors ) 列出了我工作过的存储库上的贡献者,我可以看到一个提交了多次的人没有出现,而我自己只有 3 个贡献,而我 push 了最多我们的 301 次提交。
我真的不明白这个端点返回了什么,但它看起来并不准确。该文档对此不是很详细,有人知道可以解释它的内容吗?
最佳答案
我将我的问题提交给了 Github API 的支持,他们为我提供了非常详细的答案。这是(缩写):
It looks like your missing commits were authored with an email address not linked to your GitHub profile. You can find the missing email by adding ".patch" to the end of a commit URL, then looking at the "From:" line. Once you have the email, you can link it to your profile by following these instructions:
https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user
After you link your email to your account, any valid missing contributions will be backfilled and new ones should show up automatically.
For example, when I check out the Projet-merou's commit history:
https://github.com/jxw1102/Projet-merou/commits/master
When I choose the latest commit with your GitHub username as its author and add .patch to the URL like so:
https://github.com/jxw1102/Projet-merou/commit/f5bf30243ab99efc40802d3d78c08e49839ec9c9.patch
I see this on the second line:
From: Dicee courtinot.david@orange.fr
Adding that email will backfill any missing valid contributions. After you do that, calling the API should show the expected result.
API Endpoints: Contributors and Contributors Statistics
I have written up some notes about each endpoint below. Let me know if you have any questions!
/repos/:owner/:repo/contributors
When you call
GET /repos/:owner/:repo/contributors
, the GitHub API will list contributors to the specified repository, sorted by the number of commits per contributor in descending order. Contributors data is cached for performance reasons. This endpoint may return information that is a few hours old. Git contributors are identified by author email address. This API attempts to group contribution counts by GitHub user, across all of their associated email addresses. For performance reasons, only the first 500 author email addresses in the repository will be linked to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.If you call this endpoint with
anon=1
specified, the API will return a count of all commits on the default branch, including commits that aren't associated with any user on GitHub. Here's an example:https://api.github.com/repos/jxw1102/Projet-merou/contributors?anon=1
When
anon=1
isn't specified like this:https://api.github.com/repos/jxw1102/Projet-merou/contributors
notice how the results only show commits associated with some GitHub user and doesn't count merge commits.
/repos/:owner/:repo/stats/contributors
When you call
GET /repos/:owner/:repo/stats/contributors
, the GitHub API will return the contributors list with additions, deletions, and commit counts. The total denotes the total number of commits authored by the contributor.Does that help?
All the best,
Francis
@francisfuzz
GitHub Support
关于Github V3 API : list contributors,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36410357/
我正在开发 custom language IntelliJ 插件,我想添加 code completion support使用 CompletionContributor .我正在为 Intelli
我已经阅读了以下文档 ( https://developer.github.com/v3/repos/#list-contributors ) 列出了我工作过的存储库上的贡献者,我可以看到一个提交了多
如果我可以尝试其他方法,感谢您的建议.. 我想通过 RestFul API/.Net SDK 运行 ADF 管道,并且我已按照 Microsoft 教程进行操作。 Microsoft Run ADF
我的目标是让应用程序成为存储帐户的“blob 存储贡献者”。为此,我尝试授予应用程序角色,但不能 - 尝试时遇到错误。 我正在尝试使用此命令来执行此操作: New-AzureRmRoleAssignm
我的目标是让应用程序成为存储帐户的“blob 存储贡献者”。为此,我尝试授予应用程序角色,但不能 - 尝试时遇到错误。 我正在尝试使用此命令来执行此操作: New-AzureRmRoleAssignm
我有一个 mySQL 数据库,我正在使用 PHP/HTML 页面进行查询。 我的数据库如下: +--------+-----------------+ | userID | changes
在https://github.com/yourusername/yourreponame/graphs您可以找到一些不错的图表,显示一段时间内的提交情况。然而,这些信息仅适用于主分支。 如何查看除主
当我尝试运行命令时 az ad sp create-for-rbac --role="Contributor" --scopes="/subscription/>" 我收到错误为 (MissingSu
我想获取特定存储库的贡献者及其提交总数。我正在使用 Python 2.7 和 Requests 2.7.0 库来请求 GitHub API url,例如:' https://api.github.co
我正在尝试为 Microsoft Azure 中的 2 个单独的资源组设置 2 个单独的贡献者角色用户组。在新门户中,我添加了 2 个贡献者角色组。因此,在我创建新的 Azure 网站及其资源组后,新
所以我们有 3 个内置角色:Owner , Contributor和 User Access Administrator . 考虑到贡献者可以在 Azure 订阅中执行除 RBAC 角色分配之外的所有
所以我们有 3 个内置角色:Owner , Contributor和 User Access Administrator . 考虑到贡献者可以在 Azure 订阅中执行除 RBAC 角色分配之外的所有
有没有办法使用 GitHub API 有效地获取 GitHub 存储库的所有不同贡献者的数量? 我的意思是,不一定要获取所有贡献者对象并手动计算总量。 最佳答案 解决方案可能是使用 paginatio
在链接下一步一步 http://source.android.com/source/submit-patches.html#upstream-projects 但是,在$repo upload 之后,
看来我的问题与此相关post但既然没有答案,我会再问一次。 我有一个 Azure Devops 项目,用于通过管道将静态内容部署到存储帐户内的容器中。我最近决定使用 Terraform 以及我的代码来
我需要拦截 SSDT 构建来修改构建脚本。我已经关注了MSDN Deployment Plan Modifier tutorial ,但是当我尝试构建数据库项目时,出现以下错误: Required c
看来我的问题与此相关post但既然没有答案,我会再问一次。 我有一个 Azure Devops 项目,用于通过管道将静态内容部署到存储帐户内的容器中。我最近决定使用 Terraform 以及我的代码来
我在企业环境中拥有这个 Azure Function 应用程序,该应用程序已经存在相当长一段时间了,并且似乎按预期工作。它使用用户管理的身份;除此之外,它还允许它访问存储资源。 到目前为止,一切都运行
我是一名优秀的程序员,十分优秀!