agamjotsingh18 / codesetgo

Open Source Website of CodeSetGo
https://codesetgo.netlify.app/
MIT License
77 stars 235 forks source link

Dynamically Fetch GitHub Contributors in Hexagonal Grid #652

Closed Nishitbaria closed 1 year ago

Nishitbaria commented 1 year ago

Related Issue

640

This pull request adds a new script that dynamically fetches contributors from a GitHub repository and displays them in a visually appealing hexagonal grid on a web page. The script uses the GitHub API to retrieve the list of contributors from the specified repository and then creates a grid of hexagonal tiles, each representing a contributor.

Proposed Changes

Here's a summary of the changes made in this pull request:

  1. Added a new JavaScript function getContributors(repoName, page) that makes an asynchronous API call to the GitHub API, fetching contributors for a given repository. The function handles pagination and retrieves up to 100 contributors per page.

  2. Created another function getAllContributors(repoName) that iterates over all the pages of contributors using the getContributors function, aggregating all contributors into a single array.

  3. The main function fetchContributors() calls getAllContributors to fetch the list of contributors from the repository "agamjotsingh18/codesetgo" (can be modified for other repositories).

  4. For each contributor, a hexagonal tile is dynamically created and styled using HTML and CSS classes. Each tile includes the contributor's avatar, GitHub profile link, and their login name displayed below the avatar.

  5. The hexagonal grid is populated with the dynamically created tiles, presenting a visually appealing and interactive display of all contributors in the repository.

Additional Info

Checklist

Output Screenshots

![Uploading image.png…]()

netlify[bot] commented 1 year ago

Deploy Preview for codesetgo ready!

Name Link
Latest commit 93b68d63f8e67358118ba14c8a0cb2f7492a3bd8
Latest deploy log https://app.netlify.com/sites/codesetgo/deploys/64c6b218ec5049000876fddd
Deploy Preview https://deploy-preview-652--codesetgo.netlify.app/contributer
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Nishitbaria commented 1 year ago

@agamjotsingh18 ,please review and merge my pull request