Skip to content

Commit 1e22bc1

Browse files
GuillaumeGomezJoshua Nelson
authored and
Joshua Nelson
committed
Add gitlab repository information retrieval support:
* Create RepositoryStatsUpdater type to use as interface over updaters * Add RepositoryStatsUpdater instance to global contexts so they can be used in CrateDetails * Add Pool field into RepositoryStatsUpdater * Return a default icon * Add mock tests for github and gitlab updaters
1 parent f6aef6d commit 1e22bc1

25 files changed

+1542
-573
lines changed

Cargo.lock

+139-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ procfs = "0.7"
102102
criterion = "0.3"
103103
kuchiki = "0.8"
104104
rand = "0.8"
105+
mockito = "0.29"
105106

106107
[build-dependencies]
107108
time = "0.1"

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ docker-compose run -- database add-directory <DIRECTORY> [PREFIX]
190190
# Updates github stats for crates.
191191
# You need to set CRATESFYI_GITHUB_USERNAME, CRATESFYI_GITHUB_ACCESSTOKEN
192192
# environment variables in order to run this command.
193+
# Set DOCSRS_GITLAB_ACCESSTOKEN to raise the rate limit,
194+
# or leave it blank to fetch repositories at a slower rate.
193195
# You can set this environment variables in ~/.cratesfyi.env file.
194-
docker-compose run -- database update-github-fields
196+
cargo run -- database update-repository-fields
195197
```
196198

197199
If you want to explore or edit database manually, you can connect to the database

0 commit comments

Comments
 (0)