Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to leave a message for a github.com user

Tags:

github

Need help on GitHub usage. I wonder if there is a way to communicate with a github.com user i.e. write the user a message when only username/id is given on their GitHub page? Does GitHub have this social feature?

like image 454
Yurij73 Avatar asked Oct 02 '12 08:10

Yurij73


People also ask

Can people see my email on GitHub?

The first step is to access your account settings by going to the top right corner, and then Settings. In your account settings, go to the Emails option, and uncheck the Keep my email address private option. Disabling this option will save the settings automatically.


2 Answers

Although GitHub removed the private messaging feature, there's still an alternative.

GitHub host git repositories. 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

  • 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

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.

like image 133
nulltoken Avatar answered Nov 03 '22 14:11

nulltoken


This method was working as of Jan 2022

  1. Copy and paste the next line into your browser (feel free to bookmark it): https://api.github.com/users/xxxxxxx/events/public
  2. Find the GitHub username for which you want the email. Replace the xxxxxxx in the URL with the person's GitHub username. Hit Enter.
  3. Press Ctrl+F and search for “email”.

As suggested by qbolec, the above steps can be done by using this snippet:

<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

like image 25
Porcupine Avatar answered Nov 03 '22 13:11

Porcupine