DEV Community

loading...

Insert Github Stats into Your Profile's README.

1001binary
"Developer - Security Researcher" != None
・1 min read

This is C# code to demonstrate how to insert Github Stats into your profile's README.

// First of all, sign in Github on the default browser.

const string yourGithubUsername = "YOUR_GITHUB_USERNAME";

// Go to README of your Github profile.
Process.Start($"https://github.com/{yourGithubUsername}
                /{yourGithubUsername}/edit/master/README.md");

// Insert this into README file and then replace YOUR_NAME
// and YOUR_GITHUB_USERNAME.
/*
[[YOUR_NAME]'s Stats](https://github-readme-stats.vercel.app
/api?username=[YOUR_GITHUB_USERNAME]&show_icons=true)
*/

// Sleep 15 seconds.
Thread.Sleep(TimeSpan.FromSeconds(15))
Console.WriteLine("Done")
Enter fullscreen mode Exit fullscreen mode

It sounds interesting, right?

Happy coding :)

Discussion (0)