Sourcegraph

Learn how to use Sourcegraph with Composio

Overview

SLUG

SOURCEGRAPH

Description

Sourcegraph is a code intelligence platform that enables developers to search, understand, and manage code across large codebases.

Authentication Details

bearer_token
stringRequired

Tools

SLUG: SOURCEGRAPH_CHECK_SITE_SETTINGS_EDIT_PERMISSION

Tool to check whether site settings can be edited through the api. use when you need to confirm the api allows site settings edits before attempting configuration changes.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_COMPARE_COMMITS

Tool to compare two commits in a repository and retrieve their file diffs. use after confirming the repository name and commit shas to inspect differences.

Action Parameters

base
stringRequired
head
stringRequired
repo
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_GET_CURRENT_USER

Tool to retrieve information about the currently authenticated user. use when needing confirmation of identity via sourcegraph graphql api.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_GET_FILE_CONTENTS

Tool to fetch the contents of a specified file on the default branch. use when you need raw file text without cloning the repo or using a slower code-host api.

Action Parameters

file_path
stringRequired
repo_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_LIST_REPOSITORIES

Tool to list repositories on the sourcegraph instance. use when you need to paginate through all available repositories.

Action Parameters

after
string
first
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_LIST_REPOSITORY_FILES

Tool to list all files and directories in a repository path. use when you need to enumerate files in a repository without cloning.

Action Parameters

path
string
recursive
booleanDefaults to True
repo_name
stringRequired
rev
stringDefaults to HEAD

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: SOURCEGRAPH_LIST_REPOSITORY_LANGUAGES

Tool to list languages used in a repository. use when you need to determine the primary and all languages of a given repository; call after you have the repository name.

Action Parameters

repoName
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired