GitAccessResult git.access-result@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/access-result.v1.json
git.access-result@1: the common result of git.read and git.write on OpenVibe.Git. A repository names its full name, its page and clone addresses, its visibility and default branch; a contents write or a token also carries the branch or commit it made.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
full_name | string | yes |
| |
html_url | string |
| ||
clone_url | string |
| ||
visibility | enum |
| ||
default_branch | string |
| ||
branch | string |
| ||
sha | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: contents-write
{
"full_name": "ada/my-site",
"branch": "agent/run-1",
"sha": "0123456789abcdef0123456789abcdef01234567"
}Valid: repository
{
"full_name": "ada/my-site",
"html_url": "https://git.openvibe.codes/ada/my-site",
"clone_url": "https://git.openvibe.codes/ada/my-site.git",
"visibility": "private",
"default_branch": "main"
}Rejected: insecure-clone-url
{
"full_name": "ada/my-site",
"clone_url": "http://git.openvibe.codes/ada/my-site.git"
}Rejected: not-a-full-name
{
"full_name": "ada"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('git.access-result@1', value); // { valid, errors: [{ path, message }] }