Repository

Lookup a repository and associated information.

repository

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

Arguments

Field Type Description
name String! The name of the repository to lookup.
login String! The login or username of the account under which the repository exists.
vcsProvider VCSProvider! VCS Provider of the account.

Sample Request

query {
  repository(
      name:"demo-go",
      login:"cyberdyne",
      vcsProvider:GITHUB
    ) {
    name
    defaultBranch
    dsn
    isPrivate
    analysisRuns {
      edges {
        node {
          runUid
        }
      }
    }
  }
}

Sample Response

{
  "data": {
    "repository": {
      "name": "demo-go",
      "defaultBranch": "master",
      "dsn": "https://[email protected]",
      "isPrivate": true,
      "analysisRuns": {
        "edges": [
          {
            "node": {
              "runUid": "5d821174-04vf-4214-b56d-ced0a7ca209e"
            }
          },
          {
            "node": {
              "runUid": "6ff1cdb8-9abe-4307-a177-4b9f8d3ba639"
            }
          },
        ]
      }
    }
  }
}

Objects

Repository

Field Type Description
name String! The name of this repository.
latestCommitOid String Object ID of the latest commit on the default branch.
isPrivate Boolean! Repository visibility on the VCS provider.
isActivated Boolean! Repository activation status.
id ID! The ID of the object.
account Account! The account under which this repository exists.
analysisRuns AnalysisRunConnection Past analysis runs for the repository
offset Int
before String
after String
first Int
last Int
configJson JSON The `.deepsource.toml` config of the repository represented as a JSON object.
defaultBranch String The default base branch of the repository on DeepSource.
dsn String The DSN value for this repository.
enabledAnalyzers AnalyzerConnection The analyzers enabled in this repository.
offset Int
before String
after String
first Int
last Int
issues RepositoryIssueConnection Get 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.
path String Show issues for this path only.
offset Int
before String
after String
first Int
last Int
report Report! A report associated with this repository.
key ReportKey! The key of the report to fetch.
vcsProvider VCSProvider! VCS Provider of the repository.
vcsUrl String! URL of the repository on the VCS.
metric RepositoryMetric Get a repository metric by its metric key and shortcode.
shortcode MetricShortcode! The metric shortcode.
key MetricKey! The metric key.
metrics RepositoryMetricConnection All repository metrics captured for any branch in the repository.
offset Int
before String
after String
first Int
last Int

RepositoryIssueConnection

Field Type Description
pageInfo PageInfo! Pagination data for this connection.
edges [RepositoryIssueEdge]! Contains the nodes in this connection.
totalCount Int

RepositoryIssueEdge

A Relay edge containing a RepositoryIssue and its cursor.

Field Type Description
node RepositoryIssue The item at the end of the edge.
cursor String! A cursor for use in pagination.

RepositoryConnection

Field Type Description
pageInfo PageInfo! Pagination data for this connection.
edges [RepositoryEdge]! Contains the nodes in this connection.
totalCount Int

RepositoryEdge

A Relay edge containing a Repository and its cursor.

Field Type Description
node Repository The item at the end of the edge.
cursor String! A cursor for use in pagination.