GitInsights git.insights@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- git
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/git/insights.v1.json
A repository's insights over a window: views, unique visitors, clones and stars per day, and commits per week. Public for a public repository, like GitHub's traffic but open. api/view/insights.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
repo | string | yes |
| |
window_days | integer | yes |
| |
views | integer | yes | Page views of the repository in the window. |
|
unique_visitors | integer | yes | Distinct visitors per day, summed over the window. |
|
clones | integer | yes | Successful git clones and fetches served in the window. |
|
stars | object | yes |
| |
stars.total | integer | yes |
| |
stars.in_window | integer | yes |
| |
commits_per_week | array of object | yes | The default branch's commits for each ISO week, oldest first. |
|
commits_per_week[].week | string | yes | The week's Monday, YYYY-MM-DD. |
|
commits_per_week[].commits | integer | yes |
| |
daily | array of object | yes | One row per day of the window, oldest first. |
|
daily[].day | string | yes |
| |
daily[].views | integer | yes |
| |
daily[].unique_visitors | integer | yes |
| |
daily[].clones | integer | yes |
| |
daily[].stars | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: full
{
"repo": "openvibers/openvibe.codes",
"window_days": 30,
"views": 2841,
"unique_visitors": 412,
"clones": 190,
"stars": {
"total": 12,
"in_window": 3
},
"commits_per_week": [
{
"week": "2026-10-19",
"commits": 18
},
{
"week": "2026-10-26",
"commits": 27
},
{
"week": "2026-11-02",
"commits": 31
}
],
"daily": [
{
"day": "2026-11-08",
"views": 121,
"unique_visitors": 18,
"clones": 9,
"stars": 1
},
{
"day": "2026-11-09",
"views": 96,
"unique_visitors": 14,
"clones": 7,
"stars": 0
}
]
}Rejected: window-and-negative
{
"repo": "openvibers/openvibe.codes",
"window_days": 400,
"views": -1,
"unique_visitors": 0,
"clones": 0,
"stars": {
"total": 0,
"in_window": 0
},
"commits_per_week": [],
"daily": [
{
"day": "2026-11-09",
"views": 0,
"unique_visitors": 0,
"clones": 0,
"stars": 0,
"bots": 1
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('git.insights@1', value); // { valid, errors: [{ path, message }] }