Skip to content

feat: add a cron tasks to update gitlab repo list#1771

Merged
frank-zsy merged 2 commits intoX-lab2017:masterfrom
frank-zsy:feat/update-gitlab-repo-list
Feb 4, 2026
Merged

feat: add a cron tasks to update gitlab repo list#1771
frank-zsy merged 2 commits intoX-lab2017:masterfrom
frank-zsy:feat/update-gitlab-repo-list

Conversation

@frank-zsy
Copy link
Contributor

This pull request introduces a scheduled task to fetch and update GitLab repository metadata in the database, along with configuration changes to support GitLab integration. The main changes are grouped into GitLab integration and database/data pipeline updates.

GitLab integration:

  • Added a new gitlab section to the configuration (config.ts) to store the GitLab API token and URL, enabling secure and configurable access to the GitLab API.

Database and data pipeline:

  • Implemented a new cron task (updateGitlabRepos.ts) that:
    • Periodically fetches GitLab repository data using the GitLab API.
    • Ensures the gitlab_repo_list table exists in ClickHouse and is correctly structured.
    • Parses and saves repository metadata, including topics, tags, activity timestamps, and statistics.
    • Handles incremental updates by querying for the latest activity timestamp and fetching only new or updated repositories.

Signed-off-by: frank-zsy <syzhao1988@126.com>
Copilot AI review requested due to automatic review settings February 4, 2026 04:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a scheduled task to periodically fetch and update GitLab repository metadata in ClickHouse, enabling the OpenDigger platform to track GitLab repositories alongside GitHub repositories.

Changes:

  • Added GitLab API configuration (token and apiUrl) to config.ts
  • Implemented a new cron task updateGitlabRepos.ts that fetches GitLab repository data via the GitLab API and stores it in ClickHouse
  • The task performs incremental updates by tracking the latest last_activity_at timestamp

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 15 comments.

File Description
src/config.ts Adds GitLab configuration section with token and apiUrl fields to support GitLab API access
src/cron/tasks/updateGitlabRepos.ts Implements cron task to fetch GitLab repository data, create ClickHouse table, and incrementally update repository metadata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: frank-zsy <syzhao1988@126.com>
@frank-zsy frank-zsy merged commit e449474 into X-lab2017:master Feb 4, 2026
1 check passed
@frank-zsy frank-zsy deleted the feat/update-gitlab-repo-list branch February 4, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants