Update Repository

Request

PATCH

https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}

Path parameters

Name

Description

org_slug

Type: string

Example: ``

repo_slug

Type: string

Example: ``

Query parameters

Name

Description

silent

Type: boolean

Flag for update without any notifications. NOT IMPLEMENTED YET.

Body

application/json
{
  "description": "example",
  "default_branch": "example",
  "visibility": "public",
  "links": [
    {
      "link": "example",
      "type": "default"
    }
  ],
  "template_type": "not_a_template",
  "project_id": "example",
  "settings": {
    "allow_external_contributions": true
  }
}

Name

Description

default_branch

Type: string

Example: example

description

Type: string

Example: example

links

Type: Link[]

Example
[
  {
    "link": "example",
    "type": "default"
  }
]

project_id

Type: string

Destination project UUID. Include project_id in update_mask to move the
repository; provide an empty value to remove it from its current project.

Example: example

settings

Type: RepositorySettings

Example
{
  "allow_external_contributions": true
}

template_type

Type: RepoTemplate

Enum: not_a_template, organizational, system

visibility

Type: Repository.Visibility

Enum: public, internal, private

Repository.Visibility

Type: string

Enum: public, internal, private

Link.LinkType

Type: string

Enum: default, social_network, homepage, email, telegram

Name

Description

link

Type: string

Example: example

type

Type: Link.LinkType

Enum: default, social_network, homepage, email, telegram

Example
{
  "link": "example",
  "type": "default"
}

RepoTemplate

Type: string

Enum: not_a_template, organizational, system

RepositorySettings

Name

Description

allow_external_contributions

Type: boolean

Whether authenticated users without organization or repository access can contribute to a public repository.
Has no effect on non-public repositories.

Example
{
  "allow_external_contributions": true
}

Responses

200 OK

A successful response.

Body

application/json
{
  "id": "example",
  "name": "example",
  "default_branch": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  },
  "slug": "example",
  "template_type": "not_a_template",
  "is_empty": true,
  "description": "example",
  "visibility": "public",
  "logo": {
    "url": "example"
  },
  "clone_url": {
    "https": "example",
    "ssh": "example"
  },
  "web_url": "example",
  "links": [
    {
      "link": "example",
      "type": "default"
    }
  ],
  "counters": {
    "forks": "example",
    "pull_requests": "example",
    "issues": "example",
    "tags": "example",
    "branches": "example"
  },
  "last_updated": "2025-01-01T00:00:00Z",
  "language": {
    "name": "example",
    "color": "example"
  },
  "parent": {
    "id": "example",
    "slug": "example",
    "organization": null
  },
  "migration_source": {
    "url": "example",
    "domain": "example"
  },
  "project": {
    "id": "example",
    "slug": "example"
  },
  "rating": {
    "value": 0.5,
    "percentile": 0.5,
    "reaction_counts": [
      {
        "type": "none",
        "count": "example"
      }
    ]
  },
  "settings": {
    "allow_external_contributions": true
  }
}

Name

Description

clone_url

Type: CloneURL

Example
{
  "https": "example",
  "ssh": "example"
}

counters

Type: RepositoryCounters

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

default_branch

Type: string

Example: example

description

Type: string

Example: example

id

Type: string

Example: example

is_empty

Type: boolean

language

Type: Language

Example
{
  "name": "example",
  "color": "example"
}

last_updated

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

links

Type: Link[]

Example
[
  {
    "link": "example",
    "type": "default"
  }
]

logo

Type: Image

Example
{
  "url": "example"
}

migration_source

Type: MigrationSource

Example
{
  "url": "example",
  "domain": "example"
}

name

Type: string

Deprecated: obsolete, prefer using slug. Will be removed in future API iterations.

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

parent

Type: RepositoryEmbedded

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

project

Type: ProjectEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

rating

Type: RepositoryRating

Aggregated rating information for a repository.

Example
{
  "value": 0.5,
  "percentile": 0.5,
  "reaction_counts": [
    {
      "type": "none",
      "count": "example"
    }
  ]
}

settings

Type: RepositorySettings

Example
{
  "allow_external_contributions": true
}

slug

Type: string

Example: example

template_type

Type: RepoTemplate

Enum: not_a_template, organizational, system

visibility

Type: Repository.Visibility

Enum: public, internal, private

web_url

Type: string

Example: example

OrganizationEmbedded

Name

Description

id

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example"
}

Image

Name

Description

url

Type: string

Example: example

Example
{
  "url": "example"
}

CloneURL

Name

Description

https

Type: string

Example: example

ssh

Type: string

Example: example

Example
{
  "https": "example",
  "ssh": "example"
}

RepositoryCounters

Name

Description

branches

Type: string<uint64>

Example: example

forks

Type: string<uint64>

Example: example

issues

Type: string<uint64>

Example: example

pull_requests

Type: string<uint64>

Example: example

tags

Type: string<uint64>

Example: example

Example
{
  "forks": "example",
  "pull_requests": "example",
  "issues": "example",
  "tags": "example",
  "branches": "example"
}

Language

Name

Description

color

Type: string

Example: example

name

Type: string

Example: example

Example
{
  "name": "example",
  "color": "example"
}

RepositoryEmbedded

Name

Description

id

Type: string

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

MigrationSource

Name

Description

domain

Type: string

Example: example

url

Type: string

Example: example

Example
{
  "url": "example",
  "domain": "example"
}

RepositoryRatingReaction.Type

  • none: Remove the current user's rating reaction.
  • positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.
  • positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.
  • positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface.

Type: string

Enum: none, positive_low, positive_medium, positive_high

RepositoryRatingReactionCount

Number of rating reactions of a particular type.

Name

Description

count

Type: string<uint64>

Example: example

type

Type: RepositoryRatingReaction.Type

  • none: Remove the current user's rating reaction.
  • positive_low: A low positive rating reaction. Corresponds to Like in the SourceCraft interface.
  • positive_medium: A medium positive rating reaction. Corresponds to Heart in the SourceCraft interface.
  • positive_high: A high positive rating reaction. Corresponds to Diamond in the SourceCraft interface.

Enum: none, positive_low, positive_medium, positive_high

Example
{
  "type": "none",
  "count": "example"
}

RepositoryRating

Aggregated rating information for a repository.

Name

Description

percentile

Type: number

Repository percentile among rated repositories. Omitted while percentile data is unavailable.

reaction_counts

Type: RepositoryRatingReactionCount[]

Reaction counters grouped by reaction type.

Example
[
  {
    "type": "none",
    "count": "example"
  }
]

value

Type: number

Current repository rating value.

Example
{
  "value": 0.5,
  "percentile": 0.5,
  "reaction_counts": [
    {
      "type": "none",
      "count": "example"
    }
  ]
}

default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}

Name

Description

details

Type: unknown

Example: null

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example

Предыдущая
Следующая