repository

Query:repository Fetch the details of one of your repositories.

Arguments

FieldTypeDescription
nameString!The name of the repository to lookup.
loginString!The login or username of the account under which the repository exists.
vcsProviderVCSProvider!VCS Provider of the account.

Sample Request

Sample Response

regenerateRepositoryDSN

Mutation:regenerateRepositoryDSN Regenerate a repository’s DSN.

Arguments

FieldTypeDescription
inputRegenerateRepositoryDSNInput!Input for RegenerateRepositoryDSN mutation.

Sample Request

Sample Response

updateRepositoryDefaultBranch

Mutation:updateRepositoryDefaultBranch Update a repository’s default branch for baseline. If the repository is activated, this action will trigger a new analysis. Only available to users with WRITE permission on the repository.

Arguments

FieldTypeDescription
inputUpdateRepositoryDefaultBranchInput!Input for UpdateRepositoryDefaultBranch mutation

Sample Request

Sample Response

updateRepositoryIssueCategorySetting

Mutation:updateRepositoryIssueCategorySetting Update a repository’s issue configuration (also known as quality gates). Only users with WRITE permission on the repository can trigger this mutation.

Arguments

FieldTypeDescription
inputUpdateRepositoryIssueCategorySettingInput!Input for UpdateRepositoryIssueCategorySetting mutation.

Sample Request

Sample Response

updateRepositoryIssuePrioritySetting

Mutation:updateRepositoryIssuePrioritySetting Update a repository’s issue priority configuration (also known as quality gates). Only users with WRITE permission on the repository can trigger this mutation.

Arguments

FieldTypeDescription
inputUpdateRepositoryIssuePrioritySettingInput!Input for updateRepositoryIssuePrioritySetting mutation.

Sample Request

Sample Response

updateRepositoryMetricSetting

Mutation:updateRepositoryMetricSetting Update a repository’s metric quality gates configuration. Only users with WRITE permission on the repository can trigger this mutation.

Arguments

FieldTypeDescription
inputUpdateRepositoryMetricSettingInput!Input for updateRepositoryMetricSetting mutation.

Sample Request

Sample Response

activateRepository

Mutation:activateRepositoryActivate analysis on a repository. Only users with WRITE permission on the repository can trigger this mutation.

Arguments

FieldTypeDescription
inputActivateRepositoryInput!Input for activateRepository mutation.

Sample Request

Sample Response

deactivateRepository

Mutation:deactivateRepositoryDeactivate analysis on a repository. Only users with WRITE permission on the repository can trigger this mutation.

Arguments

FieldTypeDescription
inputDeactivateRepositoryInput!Input for deactivateRepository mutation.

Sample Request

Sample Response

Objects

Repository

FieldTypeDescription
idID!The ID of the object.
nameString!The name of this repository.
vcsProviderVCSProvider!VCS Provider of the repository.
vcsUrlString!URL of the repository on the VCS.
latestCommitOidStringObject ID of the latest commit on the default branch.
isPrivateBoolean!Repository visibility on the VCS provider.
isActivatedBoolean!Repository activation status.
configJsonJSONThe `.deepsource.toml` config of the repository represented as a JSON object.
defaultBranchStringThe default base branch of the repository on DeepSource.
dsnStringThe DSN value for this repository.
accountAccount!The account under which this repository exists.
analysisRunsAnalysisRunConnectionPast analysis runs for the repository
offsetInt
beforeString
afterString
firstInt
lastInt
enabledAnalyzersAnalyzerConnectionThe analyzers enabled in this repository.
offsetInt
beforeString
afterString
firstInt
lastInt
issuesRepositoryIssueConnectionGet all issues raised in the default branch of this repository. Specifying a path would only return those issues whose occurrences are present in the file at path.
pathStringShow issues for this path only.
offsetInt
beforeString
afterString
firstInt
lastInt
ignoreRulesIgnoreRuleConnectionList of `IgnoreRule`s that exist for the repository.
issueShortcodeStringFilter by an `Issue` shortcode.
filePathStringFilter by a specific file’s path.
offsetInt
beforeString
afterString
firstInt
lastInt
reportReport!A report associated with this repository.
keyReportKey!The key of the report to fetch.
metrics[RepositoryMetric!]!List of all DeepSource metrics.
shortcodeIn[MetricShortcode]List of metric shortcodes to filter on.
issueCategorySettings[IssueCategorySetting!]!Issue categories quality gates configuration for the repository.
issuePrioritySettings[IssuePrioritySetting!]!Issue priority quality gates configuration for the repository.
metricSettings[MetricSetting!]!Metric quality gates configuration for the repository.

RepositoryIssue

FieldTypeDescription
idID!The ID of the object.
issueIssue!Definition of the issue that has been raised.
occurrencesOccurrenceConnectionAll occurrences of this issue in the default branch.
offsetInt
beforeString
afterString
firstInt
lastInt
repositoryRepository!The repository for which this issue has been raised.

RepositoryIssueConnection

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edgesRepositoryIssueEdge!Contains the nodes in this connection.
totalCountInt

RepositoryIssueEdge

A Relay edge containing a RepositoryIssue and its cursor.

FieldTypeDescription
nodeRepositoryIssueThe item at the end of the edge.
cursorString!A cursor for use in pagination.

RepositoryConnection

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[RepositoryEdge]!Contains the nodes in this connection.
totalCountInt

RepositoryEdge

A Relay edge containing a Repository and its cursor.

FieldTypeDescription
nodeRepositoryThe item at the end of the edge.
cursorString!A cursor for use in pagination.

RegenerateRepositoryDSNInput

Input for the regenerateRepositoryDSN mutation.

FieldTypeDescription
repositoryIdID!GraphQL node ID of the repository.

RegenerateRepositoryDSNPayload

Payload for the regenerateRepositoryDSN mutation.

FieldTypeDescription
dsnString!The new DSN for the repository.

UpdateRepositoryDefaultBranchInput

Input for the updateRepositoryDefaultBranch mutation.

FieldTypeDescription
idID!GraphQL node ID of the repository.
defaultBranchNameString!Default branch for analysis on the repository.

UpdateRepositoryDefaultBranchPayload

Payload for the updateRepositoryDefaultBranch mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.
repositoryRepository!Repository type.

UpdateRepositoryIssueCategorySettingInput

Input for the updateRepositoryIssueCategorySetting mutation.

FieldTypeDescription
repositoryIdID!The repository’s ID.
issueCategoryIssueCategory!The issue category you want to update.
isReportedBoolean!Whether issues of a given category are enabled for reporting in the repository.
canFailCheckBoolean!Whether to fail checks when occurrence(s) of issues of a given category is found in the repository, an issue category can only be marked to fail a check if it is enabled for reporting.

UpdateRepositoryIssueCategorySettingPayload

Paylod for the updateRepositoryIssueCategorySetting mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.

UpdateRepositoryIssuePrioritySettingInput

Input for the updateRepositoryIssuePrioritySetting mutation.

FieldTypeDescription
repositoryIdID!The repository’s ID.
issuePriorityTypeIssuePriorityType!The issue priority you want to update.
isReportedBoolean!Whether issues of a given category are enabled for reporting in the repository.
canFailCheckBoolean!Whether to fail checks when occurrence(s) of issues of a given category is found in the repository, an issue category can only be marked to fail a check if it is enabled for reporting.

UpdateRepositoryIssuePrioritySettingPayload

Payload for the updateRepositoryIssuePrioritySetting mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.

UpdateRepositoryMetricSettingInput

Input for the updateRepositoryMetricSetting mutation.

FieldTypeDescription
repositoryIdID!The repository’s ID.
metricShortcodeMetricShortcode!The shortcode of the metric you want to update.
isReportedBoolean!Whether the metric is enabled for reporting in the repository.
isThresholdEnforcedBoolean!Whether to fail checks when the metric does not meet the threshold.

UpdateRepositoryMetricSettingPayload

Payload for the updateRepositoryMetricSetting mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.

ActivateRepositoryInput

Input for the activateRepository mutation.

FieldTypeDescription
repositoryIdID!GraphQL node ID of the repository.

ActivateRepositoryPayload

Payload for the activateRepository mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.

DeactivateRepositoryInput

Input for the deactivateRepository mutation.

FieldTypeDescription
repositoryIdID!GraphQL node ID of the repository.

DeactivateRepositoryPayload

Payload for the deactivateRepository mutation.

FieldTypeDescription
okBoolean!Whether the operation was successful.