git - 在 Gitlab 中获取贡献

标签 git github graphql gitlab

目前在 github 中,我可以使用 GraphQL API 获取去年的贡献。

{
  user(login: "username") {
    contributionsCollection {
      contributionCalendar {
        weeks {
          contributionDays {
            contributionCount
            date
            color
          }
        }
      }
    }
  }
}

我无法在 gitlab GraphQL API 中找到等效项。 gitlab 里可以找到这些信息吗?即使它没有使用 GraphQL,也没关系,只是希望能够收集它。

最佳答案

您可以从事件 API 获取用户的贡献:
https://docs.gitlab.com/ee/api/events.html#get-user-contribution-events

https://gitlab.example.com/api/v4/users/:id/events

您还可以在用户页面获取用户最近贡献的 JSON 表示形式

https://gitlab.example.com/users/:username/calendar.json

关于git - 在 Gitlab 中获取贡献,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63713150/

相关文章:

javascript - NodeGit - 解决有利于 "theirs"的 merge 冲突

Git/GitHub 一个账号贡献的总行数

git - GitHub 的 TortoiseGit 问题跟踪器集成

javascript - 从函数调用 LazyQuery Hook

graphql - Gatsby & Graphql : Filter allMarkdownRemark for pages matching a variable

.net - 我应该如何使用 Git 在多台计算机上的 SharpDevelop 项目中使用 SQL Server Compact Edition?

git - 运行错误 'git apply'

linux - 由于版本号错误,git gui 无法启动

git - 本地 Git 存储库的文件夹名称是否可以与存储在 Github 上的版本名称不同?

javascript - 使用 Postgraphile 进行关系查询