repo.link write
scidex.forge.repo.link
Attach an existing Forgejo repo to a substrate artifact. Raises not_found if artifact_id does not exist. Raises validation_failed if the artifact already has a repo entry and overwrite=False (default). Raises validation_failed if repo_url points at an archived GitHub repo.
Invoke
Calls scidex.tool.invoke on the substrate with
this tool name. Edit the JSON below — it must match the
input schema. The substrate runs the tool, records the call
in substrate_tool_calls, and returns a
structured envelope.
Sign in to invoke this tool. Schema and curl snippet are visible to anyone.
Schemas
Input schema
{
"properties": {
"artifact_id": {
"description": "Substrate artifact ID to attach the repo to.",
"title": "Artifact Id",
"type": "string"
},
"repo_url": {
"description": "Forgejo HTML URL of the existing repo (no .git suffix), e.g. https://forge.scidex.ai/scidex-artifacts/hypothesis-abc123.",
"title": "Repo Url",
"type": "string"
},
"clone_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "git clone URL. Defaults to repo_url + '.git' when omitted.",
"title": "Clone Url"
},
"default_branch": {
"default": "main",
"description": "Default branch name.",
"maxLength": 200,
"title": "Default Branch",
"type": "string"
},
"visibility": {
"default": "private",
"description": "Forgejo repository visibility.",
"pattern": "^(public|private|internal)$",
"title": "Visibility",
"type": "string"
},
"collaboration_policy": {
"additionalProperties": true,
"description": "Collaboration policy for the repo.",
"title": "Collaboration Policy",
"type": "object"
},
"overwrite": {
"default": false,
"description": "When True, replace an existing artifact_repos entry for this artifact_id. By default linking an already-linked artifact raises validation_failed.",
"title": "Overwrite",
"type": "boolean"
},
"migration_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Free-form provenance tag describing why this link was created (e.g. 'v1-migration', 'manual-bootstrap'). Stored in the event payload for audit purposes.",
"title": "Migration Source"
}
},
"required": [
"artifact_id",
"repo_url"
],
"title": "ForgeRepoLinkIn",
"type": "object"
}Output schema
{
"properties": {
"artifact_id": {
"title": "Artifact Id",
"type": "string"
},
"artifact_type": {
"title": "Artifact Type",
"type": "string"
},
"title": {
"title": "Title",
"type": "string"
},
"repo_url": {
"title": "Repo Url",
"type": "string"
},
"clone_url": {
"title": "Clone Url",
"type": "string"
},
"default_branch": {
"title": "Default Branch",
"type": "string"
},
"visibility": {
"title": "Visibility",
"type": "string"
},
"was_overwritten": {
"default": false,
"description": "True when an existing repo entry was replaced (overwrite=True).",
"title": "Was Overwritten",
"type": "boolean"
}
},
"required": [
"artifact_id",
"artifact_type",
"title",
"repo_url",
"clone_url",
"default_branch",
"visibility"
],
"title": "ForgeRepoLinkOut",
"type": "object"
}curl snippet
Replace $SCIDEX_JWT with a valid bearer token. Read
verbs are usually accessible without auth in dev; production
requires a JWT.
curl -sS -X POST '/api/scidex/forge/repo/link' \
-H 'authorization: Bearer $SCIDEX_JWT' \
-H 'content-type: application/json' \
-d '{
"artifact_id": "",
"repo_url": ""
}'Discussion
No comments yet — be the first.