Oh My GitHub Circles
is a captivating visualization tool designed to showcase a user's friends on GitHub in a creatively arranged circle layout within an image. The friends are ranked based on various interaction metrics, fostering a sense of connection and community among GitHub users. This visually appealing image can be shared on social media or incorporated into your GitHub README profile to exhibit your network and interactions.
This tool visualizes a user's friends on GitHub in a circle arrangement within an image. Friends are ranked based on various interactions and their follower count. Assuming User A is the target user, the ranking for User B comprises the following points:
- If B follows A, B gains 1 point.
- If A follows B, B gains 1 point.
- If A and B mutually follow each other, B gets an additional bonus of 1 point (totaling 3 points).
Besides the following interactions, the ranking also considers:
- Pull request (PR) score - limited to a maximum of 1.6
- Issue score - limited to a maximum of 1.6
- Repository star score - limited to a maximum of 1.5
The ranking is established through these steps:
- Calculate the sum of points obtained from following interactions, along with the PR, issue, and star scores.
- Sort the friends in descending order using the combined score, and then by the user's follower count (also in descending order).
- Display up to 49 friends based on this ranking in the generated image.
To summarize, oh-my-github-cicles
organizes a user's friends on GitHub in a circle layout image. The ranking of friends takes into account following relationships, PR, issue, and star scores, and the user's follower count.
-
Fork the repository: Start by forking this repository to your own GitHub account using the "Fork" button at the top right corner of the repository page.
-
Fill secrets for GitHub Actions: In the "Settings" tab of your forked repository, navigate to "Secrets" and add the following secrets:
3.1.
USER_LOGIN
: Your target GitHub username.3.2.
DATABASE_URL
: Register for TiDB Serverless and get the connection info. You can register here: TiDB Serverless RegistrationFormat of the connection info:
mysql2://<username>:<password>@<host>:<port>/<database>
3.3.
ACCESS_TOKEN
: Create a GitHub Personal Access Token by following these instructions.
- Enable GitHub Actions: Navigate to the "Actions" tab in your forked repository, and click on the green "I understand my workflows, go ahead and enable them" button to enable GitHub Actions.
Next:
- Manually trigger the first GitHub Action: Go back to the "Actions" tab in your forked repository, choose the workflow you want to run, and click the "Run workflow" button to manually trigger it for the first time.
- Get the image URL or copy the image: Once the GitHub Action has been successfully executed, you can either get the image URL or copy the generated image directly.
Follow these steps, and you'll successfully set up "Oh My GitHub Circles" for your repository.
Oh My GitHub Circles was inspired by Chirpty, a similar visualization project for Twitter profiles. We would also like to express our gratitude to the following projects and services that played a crucial role in the development and implementation of Oh My GitHub Circles:
-
oh-my-github-pipeline: Our project depends on the oh-my-github-pipeline which is responsible for processing and transforming the GitHub user data.
-
GitHub Actions: GitHub Actions automates the entire workflow of our project, making it easy to build, test, and deploy the visualizations on demand.
-
TiDB Serverless: We leverage TiDB Serverless for seamless database management and highly efficient data handling, enabling a smooth user experience.
There is also a sister project called repo-contributor-circles, which is used to generate circle images of repository contributors, and is still under development):
Contributions are always welcome! Feel free to fork the repo, make changes, and create pull requests.
This project is open-source and available under the MIT License. See the LICENSE file for more information.