ContriHUB / ContriHUB-24

ContriHub is an event under Avishkar-24 where we are expecting to get more and more people involved in Open Source activities.
https://sac.mnnit.ac.in/contrihub
MIT License
4 stars 24 forks source link

Fetch Project Details Dynamically from GitHub API #177

Open meisabhishekpatel opened 1 month ago

meisabhishekpatel commented 1 month ago

Issue Title: Fetch Project Details Dynamically from GitHub API

Description:

Currently, the project information displayed on /projects is hardcoded in the HTML template. We want to dynamically fetch project information from the GitHub API to ensure the page stays updated with the latest information.

Requirements:

  1. Environment Variables:

    • The project names will be provided via environment variables.
    • Example: PROJECT_NAMES="project1,project2,project3"
  2. Fetch Public Repositories:

    • Use the GitHub API to fetch details of repositories from the ContriHUB organization.
    • Match the project names (from environment variables) with the names of the public repositories in ContriHUB.
  3. Pull Information:

    • For each matching repository, retrieve the following details:
      1. Project Name.
      2. Maintainer: The username of the repo owner or collaborator.
      3. About: The description (about) section of the repository.
  4. Dynamic Rendering:

    • Update the Django view to fetch the project data dynamically and pass it to the template.
    • Modify the HTML template to display this dynamically fetched data.

Tasks:

samimshoaib01 commented 1 month ago

Can i get help on this : image

meisabhishekpatel commented 1 month ago

@samimshoaib01 try to access http:// not https:// Also if you are using google chrome try using Firefox, also turn off upgrade secure connection option from settings

samimshoaib01 commented 1 month ago

@meisabhishekpatel Do, I need to match the design 0f previous one or it will be new issue: image

samimshoaib01 commented 1 month ago

@meisabhishekpatel kindly respond sir

meisabhishekpatel commented 1 month ago

@samimshoaib01 ofcourse you need to manage the old design, you need to change in the existing code, not create a new page from scratch .

hexwhiz commented 1 month ago

@meisabhishekpatel whenever I open the local server using http://127.0.0.1:8000 it shows this image

I tried using different browsers and disable secure connection option. But still the http changes to https in the browser. Can you help me with this?

meisabhishekpatel commented 1 month ago

@hexwhiz try incognito or firefox with secure connection off

hexwhiz commented 1 month ago

@meisabhishekpatel there are some things I want to ask.

meisabhishekpatel commented 1 month ago

@hexwhiz

  1. username is just fine no need to fetch the exact name.
  2. there will be only one such project only in contrihub which is Contrihub-24 for that you can get name of maintainer from env only since the maintainer which change each year.

Also I would like to clarify that do always make API call each time I hit /project instead store the project information in database and new project should be added when I hit populate issues end points then only.

hexwhiz commented 1 month ago

@meisabhishekpatel PR submitted. And it somehow shows "Review required" with red color. Should I be worried about that?

meisabhishekpatel commented 1 month ago

@hexwhiz We've added protection to the repository to ensure that no pull request can be merged without proper review and approval.