guibranco / projects-monitor

āš™ļøšŸ”” GitHub projects monitor
https://guilherme.straccini.com/projects-monitor/
MIT License
3 stars 0 forks source link

[FEATURE] Collect and Store GitHub Repository Information #13

Open guibranco opened 1 year ago

guibranco commented 1 year ago

Context: I have a project named "projects monitor" designed to organize and monitor all my repositories, projects, and infrastructure. A key feature I need is to collect all GitHub information from my repositories, both from my personal account and associated organizations. This information should be stored in a SQL table for further analysis and tracking.

Requirements:

  1. Data Collection:

    • Retrieve information from all repositories in my GitHub account and associated organizations using the GuiBranco\Pancake library for easier connection to the GitHub API.
    • The following data points should be collected for each repository:
      • Repository name
      • Owner (username or organization name)
      • Description
      • Creation date
      • Last updated date
      • Visibility (public/private)
      • Fork count
      • Star count
      • Open issues count
      • License information
  2. Database Storage:

    • Store the collected information in a MySQL/MariaDB table with the following SQL schema:
    CREATE TABLE github_repositories (
       id INT AUTO_INCREMENT PRIMARY KEY,
       repository_name VARCHAR(255) NOT NULL,
       owner VARCHAR(255) NOT NULL,
       description TEXT,
       created_at DATETIME,
       updated_at DATETIME,
       visibility ENUM('public', 'private'),
       fork_count INT DEFAULT 0,
       star_count INT DEFAULT 0,
       open_issues_count INT DEFAULT 0,
       license VARCHAR(100),
       UNIQUE KEY (repository_name, owner)
    );
  3. Updating Mechanism:

    • Implement a PHP service that runs on a weekly basis, initiated by a cron job, to update the SQL table with the latest information from GitHub.
    • Utilize the RabbitMQ integration for handling large amounts of data efficiently. This will allow for asynchronous processing of data collection and updates.
  4. CRUD Operations:

    • Leverage the GuiBranco\Pancake library to manage database CRUD operations effectively, ensuring that the data remains consistent and up-to-date.

Additional Information:

gitauto-ai[bot] commented 3 months ago

@guibranco Pull request completed! Check it out here https://github.com/guibranco/projects-monitor/pull/454 šŸš€

Note: I automatically create a pull request for an unassigned and open issue in order from oldest to newest once a day at 00:00 UTC, as long as you have remaining automation usage. Should you have any questions or wish to change settings or limits, please feel free to contact info@gitauto.ai or invite us to Slack Connect.