给定拉取请求 ID,如何获取拉取请求的作者?使用 GitHub API?

Given a pull request ID, how can I obtain the author of the pull request? Using the GitHub API?

我想获取拉取请求的作者,使用 GitHub API。更具体地说,我想要作者的电子邮件地址。

我尝试查看 GitHub 搜索 API 但我不知所措。

curl https://api.github.com/search/users?q=...

非常感谢任何帮助!

您需要先获取针对存储库的拉取请求列表,然后从中获取用户名。

curl https://api.github.com/repos/{repoorg}/{reponame}/pulls

在那里,您将拥有用户 ID。然后,您必须使用该用户 ID 对用户的 api 和访问令牌,然后您将收到电子邮件。

curl https://api.github.com/users/{userid}?access_token=xxxxxxx

访问用户联系信息需要 AccessToken。

示例: