feat: add a cron tasks to update gitlab repo list#1771
Merged
frank-zsy merged 2 commits intoX-lab2017:masterfrom Feb 4, 2026
Merged
feat: add a cron tasks to update gitlab repo list#1771frank-zsy merged 2 commits intoX-lab2017:masterfrom
frank-zsy merged 2 commits intoX-lab2017:masterfrom
Conversation
Signed-off-by: frank-zsy <syzhao1988@126.com>
There was a problem hiding this comment.
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 (
tokenandapiUrl) toconfig.ts - Implemented a new cron task
updateGitlabRepos.tsthat fetches GitLab repository data via the GitLab API and stores it in ClickHouse - The task performs incremental updates by tracking the latest
last_activity_attimestamp
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
gitlabsection 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:
updateGitlabRepos.ts) that:gitlab_repo_listtable exists in ClickHouse and is correctly structured.