需要GitHub使用方面的帮助。我想知道是否有一种方法与github.com用户沟通,即写用户的消息时,只有用户名/id在他们的GitHub页面?GitHub有这个社交功能吗?


当前回答

对我来说最简单的解决方案是把特定用户的用户名或相应用户的存储库链接!

<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 >

其他回答

对于像我这样的懒人来说,这是一个基于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现在(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用户留言的变通方法。

除了删除了github消息服务,由于许多githubbers与twitter交流,并提倡twitter,所以使用twitter通常是不必要的。

优点是:

完全透明 更好的覆盖 更好的twitter搜索功能 更好的存档,例如美国国会图书馆

stackoverflow也不允许私人消息传递,以确保完全透明,这可能不是巧合。在meta-stackoverflow上详细讨论了整个消息传递问题。

这里有另一种方法:

浏览某人的提交历史(点击分支旁边的提交可以看到整个提交历史) 点击带有用户名的提交,因为可能有很多这样的人 然后,您应该看到web地址具有连接到URL的散列。在这个提交URL中添加.patch 你可能会在那里看到这个人的电子邮件地址

例如:https://github.com/[用户]/ [reponame] /提交/散列.patch

来源:Chris Herron @ Sourcecon

只需创建一个虚拟回购,打开一个新的问题,并使用@xxxxx通知受影响的用户。

如果用户已通过电子邮件通知启用,他们将收到电子邮件,如果没有,他们将在下次登录时通知。

不需要在提交或活动流中搜索电子邮件地址,尊重隐私。