How I got Linus Torvalds in my contributors on GitHub

Before starting, you can see for yourself by clicking on the link → https://github.com/martiliones/icon-set-creator

* don’t forget to star project if you like it 🙂

Idea

One day I wondered why my commits were not showing up in the activity…


This content originally appeared on DEV Community and was authored by ?#@*&%!

Before starting, you can see for yourself by clicking on the link → https://github.com/martiliones/icon-set-creator

* don't forget to star project if you like it :)

Idea

One day I wondered why my commits were not showing up in the activity overview. I googled and found on StackOverflow that GitHub uses your git email to link to the profile instead of the authentication data. So I thought that maybe I can change git email to get a commit from another user without his participation

Realisation

First of all, you need to get e-mail address of a target user. At first my idea was to get the email address from the user's git repository, but then I found that I could use the GitHub API to get it. Here is the GET API method you can run in your browser

https://api.github.com/users/REPLACE_WITH_USERNAME/events/public

You will get list of user events and you can easily find e-mail with search box in your browser (ctrl + F in most browsers, or if "Filter JSON" for Firefox)

Once we get the email address, we can create a commit:

git -c user.name='Linus Torvalds' -c user.email='torvalds@linux-foundation.org' commit -m "JavaScript is my favorite language ?"

To display your commits in target user Activity Overview at least one of the following must be true:

  • User is a collaborator on the repository or are a member of the organization that owns the repository.
  • User have forked the repository.
  • User have opened a pull request or issue in the repository.
  • User have starred the repository.

Results

You can do this with anyone as long as you have a user's email address.

Linus Torvalds commit

Contributors Graph

Conclusion

I think GitHub should fix this bug to prevent attacks on profiles. If the target user starred your repository, you can draw something in his Activity Overview as example

Thank you for your time. Share your opinion about it in the comments ?


This content originally appeared on DEV Community and was authored by ?#@*&%!


Print Share Comment Cite Upload Translate Updates
APA

?#@*&%! | Sciencx (2021-08-25T14:54:39+00:00) How I got Linus Torvalds in my contributors on GitHub. Retrieved from https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/

MLA
" » How I got Linus Torvalds in my contributors on GitHub." ?#@*&%! | Sciencx - Wednesday August 25, 2021, https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/
HARVARD
?#@*&%! | Sciencx Wednesday August 25, 2021 » How I got Linus Torvalds in my contributors on GitHub., viewed ,<https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/>
VANCOUVER
?#@*&%! | Sciencx - » How I got Linus Torvalds in my contributors on GitHub. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/
CHICAGO
" » How I got Linus Torvalds in my contributors on GitHub." ?#@*&%! | Sciencx - Accessed . https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/
IEEE
" » How I got Linus Torvalds in my contributors on GitHub." ?#@*&%! | Sciencx [Online]. Available: https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/. [Accessed: ]
rf:citation
» How I got Linus Torvalds in my contributors on GitHub | ?#@*&%! | Sciencx | https://www.scien.cx/2021/08/25/how-i-got-linus-torvalds-in-my-contributors-on-github/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.