如何为github.com用户留言

本文翻译自:How to leave a message for a github.com user

Need help on GitHub usage. 需要有关GitHub使用的帮助。 I wonder if there is a way to communicate with a github.com user ie write the user a message when only username/id is given on their GitHub page? 我想知道是否有办法与github.com用户沟通,即在GitHub页面上只给出用户名/ id时给用户写一条消息? Does GitHub have this social feature? GitHub有这个社交功能吗?


#1楼

参考:https://stackoom.com/question/rELh/如何为github-com用户留言


#2楼

Github said on April 3rd 2012 : Github在2012年4月3日说:

Today we're removing two features. 今天我们删除了两个功能。 They've been gathering dust for a while and it's time to throw them out : Fork Queue & Private Messaging 他们已经收集了一段时间的灰尘,是时候把它们扔出去了:Fork Queue和Private Messaging

Source 资源


#3楼

Although GitHub removed the private messaging feature, there's still an alternative. 尽管GitHub删除了私人消息传递功能,但仍有其他选择。

GitHub host git repositories. GitHub主机git存储库。 If the user you're willing to communicate with has ever committed some code, there are good chances you may reach your goal. 如果您愿意与之通信的用户提交了一些代码,那么您很有可能实现目标。 Indeed, within each commit is stored some information about the author of the change or the one who accepted it. 实际上,在每次提交中都存储了一些有关变更作者或接受变更的人的信息。

Provided you're really dying to exchange with user user_test 如果您真的想与用户user_test交换

  • Display the public activity page of the user: https://github.com/user_test?tab=activity 显示用户的公共活动页面: https//github.com/user_test?tab = activity
  • Search for an event stating "user_test pushed to [branch] at [repository]" . 搜索表示“user_test被推送到[repository]的[branch]”的事件。 There are usually good chances, he 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 he pushed to: git clone https://github.com/..../repository.git 在您的本地计算机上克隆他推送到的存储库: git clone https://github.com/..../repository.git
  • Checkout the branch he pushed to: git checkout [branch] 检查他推到的分支: git checkout [branch]
  • Display the latest commits: git log -50 显示最新提交: git log -50

As a committer/author, an email should be displayed along with the commit data. 作为提交者/作者,应该与提交数据一起显示电子邮件。

Note: Every warning related to unsolicited email should apply there. 注意:与未经请求的电子邮件相关的每条警告都应适用于此处。 Do not spam. 没有垃圾邮件。


#4楼

Besides the removal of the github messaging service , usage was often not necessary due to many githubbers communicating with- and advocating twitter . 除了删除github消息传递服务之外 ,由于许多githubbers与Twitter进行通信并提倡推特 ,因此通常不需要使用。

The advantage is that there is: 优点是:

  • full transparency 完全透明
  • better coverage 更好的报道
  • better search features for tweets 更好的推文搜索功能
  • better archiving, for instance by the US Library of Congress 更好的归档,例如美国国会图书馆

It is probably no coincidence that stackoverflow doesn't allow private messaging either, to ensure full transparency. stackoverflow也不允许私人消息传递,以确保完全透明,这可能并非巧合。 The entire messaging issue is thoroughly discussed on meta-stackoverflow here . 这里有关于meta-stackoverflow的完整消息传递问题。


#5楼

This method was working as of March 2019 这种方法在2019年3月开始运作

  1. Copy and paste the next line into your browser (feel free to bookmark it): https://api.github.com/users/xxxxxxx/events/public 将下一行复制并粘贴到您的浏览器中(随时将其加入书签): https//api.github.com/users/xxxxxxx/events/public
  2. Find the GitHub username for which you want the email. 找到您要为其发送电子邮件的GitHub用户名。 Replace the xxxxxxx in the URL with the person's GitHub username. 用人的GitHub用户名替换URL中的xxxxxxx。 Hit Enter. 按Enter键。
  3. Press Ctrl+F and search for “email”. 按Ctrl + F并搜索“电子邮件”。

As suggested by qbolec , the above steps can be done by using this snippet: 正如qbolec所建议的,上述步骤可以通过使用此代码段来完成:

 <input id=username type="text" placeholder="github username or repo link"> <button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO</button> <div id=results></div> 

Source: Matthew Ferree @ Sourcecon 资料来源: Matthew Ferree @ Sourcecon


#6楼

For lazy people, like me, a snippet based on Nikhil's solution 对于像我这样的懒人,基于Nikhil解决方案的片段

 <input id=username type="text" placeholder="github username or repo link"> <button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO</button> <div id=results></div> 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值