Mobile support to come.
mod create_repository;
mod get_repository_commits;
mod get_repository_file;
mod get_repository_file_commits;
mod get_repository_preview;
mod get_repository_tree;
use chrono::{DateTime, Utc};
use serde::Serialize;
use uuid::Uuid;
use gitdot_core::dto::{CommitAuthorResponse, RepositoryCommitResponse, RepositoryResponse};
pub use create_repository::CreateRepositoryServerRequest;
pub use get_repository_commits::{GetRepositoryCommitsQuery, GetRepositoryCommitsServerResponse};
pub use get_repository_file::{GetRepositoryFileQuery, GetRepositoryFileServerResponse};
pub use get_repository_file_commits::GetRepositoryFileCommitsQuery;
pub use get_repository_preview::{GetRepositoryPreviewQuery, GetRepositoryPreviewServerResponse};
pub use get_repository_tree::{GetRepositoryTreeQuery, GetRepositoryTreeServerResponse};
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct RepositoryServerResponse {
pub id: Uuid,
pub name: String,
pub owner: String,
pub visibility: String,
pub created_at: DateTime<Utc>,
}
impl From<RepositoryResponse> for RepositoryServerResponse {
fn from(response: RepositoryResponse) -> Self {
Self {
id: response.id,
name: response.name,
owner: response.owner,
visibility: response.visibility,
created_at: response.created_at,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct RepositoryCommitServerResponse {
pub sha: String,
pub message: String,
pub date: DateTime<Utc>,
pub author: CommitAuthorServerResponse,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct CommitAuthorServerResponse {
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<Uuid>,
pub name: String,
pub email: String,
}
impl From<CommitAuthorResponse> for CommitAuthorServerResponse {
fn from(author: CommitAuthorResponse) -> Self {
Self {
id: author.id,
name: author.name,
email: author.email,
}
}
}
impl From<RepositoryCommitResponse> for RepositoryCommitServerResponse {
fn from(commit: RepositoryCommitResponse) -> Self {
Self {
sha: commit.sha,
message: commit.message,
date: commit.date,
author: commit.author.into(),
}
}
}
fn default_ref() -> String {
"HEAD".to_string()
}
fn default_page() -> u32 {
1
}
fn default_per_page() -> u32 {
30
}
updated commits api to return gitdot user info if exist
mikkel•3060c5a6d ago
implemented file preview endpoint
mikkel•675c1287d ago
implemented get org repositories api
mike•30938bb12d ago
migrated get_repository_file_commits api
mike•3fe674c15d ago
migrated get commits
mike•7a6a65a16d ago
re-implemented get repo tree and file
mike•1de709416d ago
implemented boilerplate for get repo tree and file api
mike•ec579cb16d ago
rewrote create_repository handler
mike•ba2ca1616d ago
migrated create_repository to new design
mike•f5802ef20d ago
renaming diff chunk -> diff hunks
baepaul•0c3bbca24d ago
rendering file diffs
baepaul•053598525d ago
trimming things from the dto to disambiguate from difftastic output / our variables
baepaul•f085b0425d ago
invoking difft as shell in-process in backend
baepaul•aea2f1725d ago
sat stat bar visualization and chunky header now
baepaul•091691926d ago
renaming to get_repository_commit_diffs
and providing a longer commit message
than i am prone to type for additional context here
baepaul•127919126d ago
implementing get_repository_commit_diff
baepaul•17c154d26d ago
supporting file previews
baepaul•f6e78cb27d ago
fixing bug in file-commits + making repository tree return commit metadata for latest file / folder modified
baepaul•119493f1mo ago
a lot of stuff
baepaul•e9052cb1mo ago
changing favicon + claude coding backend prototype
baepaul•8523bb71mo ago
Implemented get commits endpoint
mike•d4a3a0c1mo ago
Implemented an endpoint to create a new repo
mike•48a9dd91mo ago