Connection to the GitHub GraphQL api

The structure holding all the GitHub information

Repotomata.RepoType
Repo

Wrapper representing the GitHub Repository.

Fields

  • owner::String: the repository owner.
  • name::String: the repository name.
  • languages::Vector{Language}: the repository Languages.
  • stargazer_count::UInt: the repository stargazer count.
  • forks_count::UInt: the repository forks count.
  • watchers_count::UInt: the repository watchers count.
  • updatedat::DateTime: the repository last update time.
  • background_color::Colorant: the chosen background color

See also: Language

source
Repotomata.RepoMethod
Repo

The Repo constructor will create a Connection with the given owner/name and query the needed information.

See also: Connection

source

The connection wrapper

Repotomata.ConnectionType
Connection

Simple wrapper around Diana.Client with the current repository name and owner.

Fields

  • owner::String: the repository owner.
  • name::String: the repository name.
  • client::Diana.Client: the Diana.Client object.
source

The language structure

Repotomata.LanguageType
Language

When parsed from GitHub a Language has a name, color and the "usage" size.

Fields

  • name::String: the language name.
  • color::Colorant: the language color (provided by github/linguist).
  • size::Int: the relative usage of this Language in the repository.

See also: Repo

source

Utility functions

Repotomata.queryMethod
query(connection::Connection, queryString)

The base function to make the queries. It wraps the provided query in a "repository" query. It also handles connection and result errors.

source
Repotomata.get_languagesMethod
get_languages(connection)

Utility function used to query all the languages of the repository. Return a Vector of Languages sorted by size (bigger first).

source

Error handling

Repotomata.ErrorType
Error

Simple error wrapper.

Fields

  • name::String: the error name.
  • type::String: the error type.
  • message::String: the error message.
source
Repotomata.GitHubErrorType
GitHubError

Any error related to the repository connection.

The error is created with either:

  • A HTTP.ExceptionRequest.StatusError
  • A failling Diana.Result
  • A string (for now only for the token error)

Fields

  • errors::Vector{Error}: a collection of Errors.
source