Ecto model for project repo connections
Summary
Functions
Returns true when any other connection already binds the given
(repo, branch) to the same project tree (identified by root_project_id).
Excludes the row identified by self_id so that updates to an existing
connection don't conflict with themselves.
True if the given changeset's insert/update failed on the tree-uniqueness
index. Used to translate a constraint violation back into the
:branch_used_in_project_tree atom error at the boundary.
A file inside the CLI workspace (v2), relative to the repo root
The CLI workspace (v2), relative to the repo root
Types
@type t() :: %Lightning.VersionControl.ProjectRepoConnection{ __meta__: Ecto.Schema.Metadata.t(), accept: term(), access_token: term(), branch: String.t() | nil, config_path: term(), github_installation_id: String.t() | nil, id: Ecto.UUID.t() | nil, inserted_at: term(), local_alias: term(), project: nil | Lightning.Projects.Project.t() | Ecto.Association.NotLoaded, project_id: term(), repo: String.t() | nil, root_project_id: Ecto.UUID.t() | nil, sync_direction: term(), sync_version: term(), updated_at: term(), workspace_path: term() }
Functions
@spec tree_branch_conflict?( Ecto.UUID.t(), String.t(), String.t(), Ecto.UUID.t() | nil ) :: boolean()
Returns true when any other connection already binds the given
(repo, branch) to the same project tree (identified by root_project_id).
Excludes the row identified by self_id so that updates to an existing
connection don't conflict with themselves.
@spec tree_unique_violation?(Ecto.Changeset.t()) :: boolean()
True if the given changeset's insert/update failed on the tree-uniqueness
index. Used to translate a constraint violation back into the
:branch_used_in_project_tree atom error at the boundary.
A file inside the CLI workspace (v2), relative to the repo root
The CLI workspace (v2), relative to the repo root