Skip to main content
PUT
/
servers
/
{namespace}
/
{server}
/
repo
JavaScript
import Smithery from '@smithery/api';

const client = new Smithery({
  apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});

const response = await client.servers.repo.set('server', {
  namespace: 'namespace',
  repoName: 'x',
  repoOwner: 'x',
});

console.log(response.autoDeploy);
{
  "repoOwner": "octocat",
  "repoName": "hello-world",
  "baseDirectory": ".",
  "branch": "main",
  "autoDeploy": true,
  "isPrivate": false,
  "type": "github"
}

Authorizations

Authorization
string
header
required

Smithery API key as Bearer token

Path Parameters

namespace
string
required
server
string
required

Body

application/json
repoOwner
string
required
Minimum string length: 1
repoName
string
required
Minimum string length: 1
baseDirectory
string
default:.
Minimum string length: 1
Example:

"."

branch
string | null
Example:

"main"

autoDeploy
boolean
default:true
Example:

true

Response

Repository connection created or updated

repoOwner
string
required
Example:

"octocat"

repoName
string
required
Example:

"hello-world"

baseDirectory
string
required
Example:

"."

branch
string | null
required
Example:

"main"

autoDeploy
boolean | null
required
Example:

true

isPrivate
boolean
required
Example:

false

type
string
required
Allowed value: "github"
Example:

"github"