Spatio.Api.Repo (spatio_sdk v0.0.2)

API calls for all endpoints tagged Repo.

Summary

Functions

Link an existing Spatio task to this repo, allocating a per-repo number.

List the caller's accessible repositories.

List tasks linked to this repo (the "issues" surface).

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • sha (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • number (integer()):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • id (String.t):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

Functions

create_repo_branch(connection, owner, repo, request_body, opts \\ [])

@spec create_repo_branch(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Create a branch (from a base sha).

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

create_repo_pull_request(connection, owner, repo, request_body, opts \\ [])

@spec create_repo_pull_request(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Open a pull request.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

create_repo_repository(connection, request_body, opts \\ [])

@spec create_repo_repository(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Create a repository.

Parameters

  • connection (Spatio.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

get_repo_commit(connection, owner, repo, sha, opts \\ [])

@spec get_repo_commit(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Fetch a single commit.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • sha (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

get_repo_repository(connection, owner, repo, opts \\ [])

@spec get_repo_repository(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Fetch a single repository.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_branches(connection, owner, repo, opts \\ [])

@spec list_repo_branches(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List branches on a repository.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_commits(connection, owner, repo, opts \\ [])

@spec list_repo_commits(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List commits on a repository.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters
    • :branch (String.t):
    • :limit (integer()):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_pull_requests(connection, owner, repo, opts \\ [])

@spec list_repo_pull_requests(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List pull requests on a repository.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_repositories(connection, opts \\ [])

@spec list_repo_repositories(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List the caller's accessible repositories.

Parameters

  • connection (Spatio.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :visibility (String.t):
    • :limit (integer()):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_tasks(connection, owner, repo, opts \\ [])

@spec list_repo_tasks(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List tasks linked to this repo (the "issues" surface).

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters
    • :state (String.t):
    • :per_page (integer()):
    • :page (integer()):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

list_repo_workflows(connection, owner, repo, opts \\ [])

@spec list_repo_workflows(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List CI workflows.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

merge_repo_pull_request(connection, owner, repo, number, opts \\ [])

@spec merge_repo_pull_request(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Merge a pull request.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • number (integer()):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

trigger_repo_workflow(connection, owner, repo, id, opts \\ [])

@spec trigger_repo_workflow(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Trigger a workflow_dispatch run.

Parameters

  • connection (Spatio.Connection): Connection to server
  • owner (String.t):
  • repo (String.t):
  • id (String.t):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_create_repo_branch(connection, org, workspace, owner, repo, request_body, opts \\ [])

@spec workspace_create_repo_branch(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_create_repo_pull_request(connection, org, workspace, owner, repo, request_body, opts \\ [])

@spec workspace_create_repo_pull_request(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_create_repo_repository(connection, org, workspace, request_body, opts \\ [])

@spec workspace_create_repo_repository(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_get_repo_commit(connection, org, workspace, owner, repo, sha, opts \\ [])

@spec workspace_get_repo_commit(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • sha (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_get_repo_repository(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_get_repo_repository(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_branches(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_list_repo_branches(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_commits(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_list_repo_commits(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_pull_requests(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_list_repo_pull_requests(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_repositories(connection, org, workspace, opts \\ [])

@spec workspace_list_repo_repositories(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_tasks(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_list_repo_tasks(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_list_repo_workflows(connection, org, workspace, owner, repo, opts \\ [])

@spec workspace_list_repo_workflows(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_merge_repo_pull_request(connection, org, workspace, owner, repo, number, opts \\ [])

@spec workspace_merge_repo_pull_request(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • number (integer()):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

workspace_trigger_repo_workflow(connection, org, workspace, owner, repo, id, opts \\ [])

@spec workspace_trigger_repo_workflow(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Parameters

  • connection (Spatio.Connection): Connection to server
  • org (String.t):
  • workspace (String.t):
  • owner (String.t):
  • repo (String.t):
  • id (String.t):
  • opts (keyword): Optional parameters
    • :body (%{optional(String.t) => any()}):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure