neokd / DataStorehouse

DataStoreHouse is an open-source project that aims to create a collaborative platform for gathering and sharing a wide variety of datasets. It provides a centralised repository where individuals and organisations can contribute, discover, and collaborate on diverse datasets for various domains.
https://datash.vercel.app
MIT License
18 stars 22 forks source link

Fork count in navbar: new feature #52

Closed rtiop closed 1 year ago

rtiop commented 1 year ago

Description

The changes made in this pull request hopefully permit the website to dynamically display the number of forks the DataStorehouse has. Caution: I have not been able to test the code. It is possible that it doesn't work and shouldn't be merged.

Related Issues

35 Fork Count in Navbar[Website] This addresses that.

Changes Made

Changed the Navbar.jsx component to call the fork counting function and display it and added a new script in the script folder (fork_count.js) to actually count the forks.

Screenshots (if applicable)

Untested. Test before merging.

Checklist

Please review and check the following before submitting your pull request:

Additional Notes

Only 60 requests can be made by hour from one unauthenticated user (documentation here) to the Github REST API. So at some point, the function should return "Unknown".

To solve this, someone should create a key and set up the code to use it, at which point, we'll be able to do 5000 request per hour. Contributions are welcome, because ... I don't have the know-how to do it.

The code is untested, I don't know how to preview the React web application. Thank you for your understanding.

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @neokd on Vercel.

@neokd first needs to authorize it.

neokd commented 1 year ago

@rtiop you create a function either directly in the Navbar.jsx file or have a look on Octokit.js

rtiop commented 1 year ago

I've tried another approach using octokit directly in Navbar.jsx.

neokd commented 1 year ago

Have u tested it?

rtiop commented 1 year ago

No, I don't know how to preview a React web app. I opened the pull request to see if someone else could test it. I mentioned it in the description of the request.

Priyamakeshwari commented 1 year ago

@rtiop This is not working so I am not merging your pull request