JGIT - 获取每一个授权的私人项目
JGIT - Get every authorized private project
我正在尝试获取 给定用户 被授权 "see" 的每个项目。例如,当我登录我的 GitLab 帐户时,我可以(从仪表板)选择我想要探索的项目。
所以,我需要的是使用 Jgit 动态地 "list" 获取 ,以便将其显示给登录我的 webapp 的用户。
是否可以使用 JGit 来实现?或者我应该使用 GIT-API?
你提到的 GIT-API (https://developer.github.com/v3/) 是针对 GitHub,而不是 GitLab。
对于 GitLab,您应该使用 https://docs.gitlab.com/ce/api/。
在 gitlab-ce issue 33657 and implemented with gitlab-ce merge_request 12596 in commit 050eae8
中请求列出用户可访问的项目
GET /users/:user_id/projects
你不需要 JGit,而是 Java 中的 GitLAb API 包装器,例如 gmessner/gitlab4j-api
。
我正在尝试获取 给定用户 被授权 "see" 的每个项目。例如,当我登录我的 GitLab 帐户时,我可以(从仪表板)选择我想要探索的项目。
所以,我需要的是使用 Jgit 动态地 "list" 获取 ,以便将其显示给登录我的 webapp 的用户。
是否可以使用 JGit 来实现?或者我应该使用 GIT-API?
你提到的 GIT-API (https://developer.github.com/v3/) 是针对 GitHub,而不是 GitLab。
对于 GitLab,您应该使用 https://docs.gitlab.com/ce/api/。
在 gitlab-ce issue 33657 and implemented with gitlab-ce merge_request 12596 in commit 050eae8
中请求列出用户可访问的项目GET /users/:user_id/projects
你不需要 JGit,而是 Java 中的 GitLAb API 包装器,例如 gmessner/gitlab4j-api
。