需要GitHub使用方面的帮助。我想知道是否有一种方法与github.com用户沟通,即写用户的消息时,只有用户名/id在他们的GitHub页面?GitHub有这个社交功能吗?
当前回答
截至2023年1月,该方法一直有效
复制并粘贴下一行到您的浏览器(请随意 收藏):https://api.github.com/users/xxxxxxx/events/public 找到你想要电子邮件的GitHub用户名。取代 在URL中使用此人的GitHub用户名xxxxxxx。回车。 按Ctrl+F,搜索“email”。
正如qbolec所建议的,上面的步骤可以通过使用下面的代码片段来完成:
<input id=username type="text" placeholder="github用户名或repo链接"> <按钮onclick = " https://api.github.com/users/获取(“$ {username.value.replace (/ ^ * com [/]([^/]*).*$/,'$ 1)} /事件/公共的)(e = > e.json())。然后,……新的([].concat.apply ([], e。filter(x => x.type==='PushEvent')。地图(x = > x.payload.commits.map (c = > c.author.email)))) . values()))。则(x =>结果。innerText = x)按钮“> < / > < div id =结果> < / div >
字幕:Matthew Ferree
其他回答
2012年4月3日,Github表示:
今天我们要删除两个特性。它们已经被尘封了一段时间,是时候把它们扔出去了:Fork Queue & Private Messaging
源
对于像我这样的懒人来说,这是一个基于Nikhil解决方案的片段
<input id=username type="text" placeholder="github用户名或repo链接"> <按钮onclick = " https://api.github.com/users/获取(“$ {username.value.replace (/ ^ * com [/]([^/]*).*$/,'$ 1)} /事件/公共的)(e = > e.json())。然后,……新的([].concat.apply ([], e。filter(x => x.type==='PushEvent')。地图(x = > x.payload.commits.map (c = > c.author.email)))) . values()))。则(x =>结果。innerText = x)按钮“> < / > < div id =结果> < / div >
尽管GitHub删除了私人消息功能,但仍然有一个替代方案。
GitHub主机git存储库。如果您愿意与之交流的用户曾经提交过一些代码,那么您就很有可能实现您的目标。实际上,在每次提交中都存储了一些关于更改的作者或接受更改的人的信息。
前提是你真的很想和用户user_test交换
Display the public activity page of the user: https://github.com/user_test?tab=activity Search for an event stating "user_test pushed to [branch] at [repository]". There are usually good chances, they may have pushed one of his own commits. Ensure this is the case by clicking on the "View comparison..." link and make sure the user is listed as one of the committers. Clone on your local machine the repository they pushed to: git clone https://github.com/..../repository.git Checkout the branch they pushed to: git checkout [branch] Display the latest commits: git log -50
作为提交者/作者,应该显示一封电子邮件以及提交数据。
注意:所有与不请自来的电子邮件相关的警告都适用于此。不要发垃圾邮件。
对我来说最简单的解决方案是把特定用户的用户名或相应用户的存储库链接!
<input id=username type="text" placeholder="Github用户名或回购链接"> <按钮onclick = " https://api.github.com/users/获取(“$ {username.value.replace (/ ^ * com [/]([^/]*).*$/,'$ 1)} /事件/公共的)(e = > e.json())。然后,……新的([].concat.apply ([], e。filter(x => x.type==='PushEvent')。地图(x = > x.payload.commits.map (c = > c.author.email)))) . values()))。则(x =>结果。innerText = x)“>GO, Get email!”< / >按钮 < div id =结果> < / div >
GitHub有这个社交功能吗?
如果提交电子邮件是私人的,GitHub现在(2020年7月)建议:
用户和组织现在可以将Twitter用户名添加到他们的GitHub配置文件中
You can now add your Twitter username to your GitHub profile directly from your profile page, via profile settings, and also the REST API. We've also added the latest changes: Organization admins can now add Twitter usernames to their profile via organization profile settings and the REST API. All users are now able to see Twitter usernames on user and organization profiles, as well as via the REST and GraphQL APIs. When sponsorable maintainers and organizations add Twitter usernames to their profiles, we'll encourage new sponsors to include that Twitter username when they share their sponsorships on Twitter.
这可能是一种给GitHub用户留言的变通方法。
推荐文章
- 了解Git和GitHub的基础知识
- 在GitHub上有一个公共回购的私人分支?
- 只用GitHub动作在特定分支上运行作业
- Git合并与强制覆盖
- 是否有一个链接到GitHub下载文件的最新版本的存储库?
- GitHub -致命:无法读取用户名https://github.com':没有这样的文件或目录
- Github:我能看到回购的下载数量吗?
- 如何运行一个github-actions步骤,即使前一步失败,同时仍然失败的工作
- 当我试图推到原点时,为什么Git告诉我“没有这样的远程‘原点’”?
- 在GitHub repo上显示Jenkins构建的当前状态
- 如何取消在github上的拉请求?
- HEAD和master的区别
- 在另一个目录中运行操作
- GitHub克隆与OAuth访问令牌
- 我可以在GitHub上对要点进行拉请求吗?