GitHub Search: Platform used to crawl, store and present projects from GitHub, as well as any statistics related to them
GitHub Search: Platform used to crawl, store and present projects from GitHub, as well as any statistics related to them
This project is made of two components:
| Dependency | Version Requirement |
|---|---|
| Java | 17 |
| Maven | 3.9 |
| MySQL | 8.3 |
| Flyway | 10.13 |
| cloc[^1] | 2.00 |
| Git[^1] | 2.43 |
[^1]: Only required in versions prior to 1.7.0
Before choosing whether to start with a clean slate or pre-populated database, make sure the following requirements are met:
The database timezone is set to +00:00. You can verify this via:
SELECT @@global.time_zone, @@session.time_zone;The event scheduler is turned ON. You can verify this via:
SELECT @@global.event_scheduler;The binary logging during the creation of stored functions is set to 1. You can verify this via:
SELECT @@global.log_bin_trust_function_creators;The gse database exists. To create it:
CREATE DATABASE gse CHARACTER SET utf8 COLLATE utf8_bin;The gseadmin user exists. To create one, run:
CREATE USER IF NOT EXISTS 'gseadmin'@'%' IDENTIFIED BY 'Lugano2020';
GRANT ALL ON gse.* TO 'gseadmin'@'%';If you prefer to begin with an empty database, there is nothing more for you to do. The required tables will be generated through Flyway migrations during the initial startup of the server. However, if you would like your local database to be pre-populated with the data we've collected, you can use the compressed SQL dump we offer. We host this dump, along with the four previous iterations, on Dropbox. After choosing and downloading a database dump, you can import the data by executing:
gzcat Alternatively, you can compile and run the JAR directly:
mvn clean package
ln target/ghs-application-*.jar target/ghs-application.jar
java -Dghs.github.tokens= -jar target/ghs-application.jarHere is a list of project-specific arguments supported by the application that you can find in the application.properties:
| Variable Name | Type | Default Value | Description |
|---|---|---|---|
ghs.github.tokens |
List<String> | List of GitHub personal access tokens (PATs) that will be used for mining the GitHub API. Must not contain blank strings. | |
ghs.github.api-version |
String | 2022-11-28 | GitHub API version used across various operations. |
ghs.git.username |
String | Git account login used to interact with the version control system. | |
ghs.git.password |
String | Password used to authenticate the specified Git account. | |
ghs.git.config |
Map<String,String> | See application.properties | Git configurations specific to the application[^2]. |
ghs.git.folder-prefix |
String | ghs-clone- | Prefix used for the temporary directories into which analyzed repositories are cloned. Must not be blank. |
ghs.git.ls-remote-timeout-duration |
Duration | 1m | Maximum time allowed for listing remotes of Git repositories. |
ghs.git.clone-timeout-duration |
Duration | 5m | Maximum time allowed for cloning Git repositories. |
ghs.cloc.max-file-size |
DataSize | 25MB | Maximum file size threshold for analysis with cloc. |
ghs.cloc.timeout-duration |
Duration | 5m | Maximum time allowed for a cloc command to execute. |
ghs.crawler.enabled |
Boolean | true | Specifies if the repository crawling job is enabled. |
ghs.crawler.minimum-stars |
int | 10 | Inclusive lower bound for the number of stars a project needs to have in order to be picked up by the crawler. Must not be negative. |
ghs.crawler.languages |
List<String> | See application.properties | List of language names that will be targeted during crawling. Must not contain blank strings. To ensure proper operations, the names must match those specified in linguist. |
ghs.crawler.start-date |
Date | 2008-01-01T00:00:00Z | Default crawler start date: the earliest date for repository crawling in the absence of prior crawl jobs. Value format: yyyy-MM-ddTHH:MM:SSZ. |
ghs.crawler.delay-between-runs |
Duration | PT6H | Delay between successive crawler runs, expressed as a duration string. |
ghs.analysis.enabled |
Boolean | true | Specifies if the analysis job is enabled. |
ghs.analysis.delay-between-runs |
Duration | PT6H | Delay between successive analysis runs, expressed as a duration string. |
ghs.analysis.max-pool-threads |
int | 3 | Maximum amount of live threads dedicated to concurrently analyzing repositories. Must be positive. |
ghs.clean-up.enabled |
Boolean | true | Specifies if the job responsible for removing unavailable repositories (clean-up) is enabled. |
ghs.clean-up.cron |
CronTrigger | 0 0 0 * * 1 | Delay between successive repository clean-up runs, expressed as a Spring CRON expression. |
No open issues yet, or sync has not completed.